Skip to content

[cssom-view-1] Define OpaqueRange geometry APIs (getClientRects/getBoundingClientRect)#12904

Draft
stephanieyzhang wants to merge 6 commits intow3c:mainfrom
stephanieyzhang:stzhang/fcr
Draft

[cssom-view-1] Define OpaqueRange geometry APIs (getClientRects/getBoundingClientRect)#12904
stephanieyzhang wants to merge 6 commits intow3c:mainfrom
stephanieyzhang:stzhang/fcr

Conversation

@stephanieyzhang
Copy link

@stephanieyzhang stephanieyzhang commented Oct 6, 2025

OpaqueRange is an AbstractRange subtype whose is opaque flag is true, causing startContainer and endContainer to return null. This preserves encapsulation while enabling range-based geometry operations over content in <input>/<textarea> (with a path to custom elements in the future).

This change defines getClientRects() and getBoundingClientRect() for OpaqueRange, aligning their behavior with Range for layout and rendering queries. It complements the DOM and HTML integrations, ensuring consistent geometry retrieval for editing and highlight use cases.

@stephanieyzhang stephanieyzhang changed the title Add FormControlRange getClientRects/getBoundingClientRects [cssom-view-1] Add FormControlRange getClientRects/getBoundingClientRects Oct 6, 2025
@stephanieyzhang stephanieyzhang changed the title [cssom-view-1] Add FormControlRange getClientRects/getBoundingClientRects [DO NOT REVIEW][cssom-view-1] Add FormControlRange getClientRects/getBoundingClientRects Oct 6, 2025
@stephanieyzhang stephanieyzhang changed the title [DO NOT REVIEW][cssom-view-1] Add FormControlRange getClientRects/getBoundingClientRects [cssom-view-1] Add FormControlRange getClientRects/getBoundingClientRects Oct 9, 2025
@stephanieyzhang stephanieyzhang changed the title [cssom-view-1] Add FormControlRange getClientRects/getBoundingClientRects [cssom-view-1] Add FormControlRange geometry APIs (getClientRects/getBoundingClientRects) Oct 9, 2025
rename to PlainTextRange + tpac changes
@stephanieyzhang stephanieyzhang changed the title [cssom-view-1] Add FormControlRange geometry APIs (getClientRects/getBoundingClientRects) [cssom-view-1] Add PlainTextRange geometry APIs (getClientRects/getBoundingClientRects) Dec 4, 2025
@stephanieyzhang stephanieyzhang changed the title [cssom-view-1] Add PlainTextRange geometry APIs (getClientRects/getBoundingClientRects) [cssom-view-1] Define OpaqueRange geometry APIs (getClientRects/getBoundingClientRect) Jan 14, 2026
text:WebDriver BiDi emulated available screen area
text:WebDriver BiDi emulated total screen area
spec:dom; type:interface; text:OpaqueRange
spec:dom; type:dfn; text:opaque range string
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove


This section defines {{OpaqueRange/getClientRects()}} and {{OpaqueRange/getBoundingClientRect()}} for
{{OpaqueRange}}. These mirror {{Range}}'s {{Range/getClientRects()}} and
{{Range/getBoundingClientRect()}}, but operate over the selected portion of the opaque range string
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorporate internal node containers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant