[cssom-view-1] Add FormControlRange geometry APIs (getClientRects/getBoundingClientRects) #12904
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FormControlRange
is a specialized, liveAbstractRange
subclass representing selection and caret positions within the value space of<input>
and<textarea>
elements. It enables range-based geometry operations for native form controls while preserving encapsulation by disallowing directRange
mutations.This change adds
getClientRects()
andgetBoundingClientRect()
methods to theFormControlRange
interface, aligning its behavior withRange
for layout and rendering queries. It complements the DOM and HTML integrations ofFormControlRange
, ensuring consistent geometry retrieval across editing and selection APIs.Explainer: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/FormControlRange/explainer.md
WhatWG discussion: FormControlRange Interface whatwg/html#11478
Corresponding DOM Spec PR: Add FormControlRange interface whatwg/dom#1404
Corresponding HTML Spec PR: Integrate FormControlRange hooks into text controls (input/textarea) whatwg/html#11741
WPT tests are written and can be reviewed and commented upon at:
At least two implementers are interested (and none opposed):
Implementation bugs are filed:
Current built changes: Overview.html