script: Implement Range::getClientRects and Range::getBoundingClientRect (#35993)

* Add doc comments to boundary point

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Allow querying content box of text fragments

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement Range::getBoundingClientRect

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-03-19 09:33:11 +01:00 committed by GitHub
parent 07e06f5635
commit 6be7612d16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 73 additions and 29 deletions

View file

@ -1,3 +0,0 @@
[DOMRectList.html]
[Range getClientRects()]
expected: FAIL

View file

@ -1,9 +0,0 @@
[getBoundingClientRect-svg.html]
[Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG <text>]
expected: FAIL
[Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG <text> with a transform]
expected: FAIL
[Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG <text> with a rotate]
expected: FAIL

View file

@ -26,9 +26,6 @@
[Element interface: document.createElement("div") must inherit property "getBoxQuads(BoxQuadOptions)" with the proper type]
expected: FAIL
[Range interface: new Range() must inherit property "getBoundingClientRect()" with the proper type]
expected: FAIL
[Element interface: calling convertRectFromNode(DOMRectReadOnly, GeometryNode, ConvertCoordinateOptions) on document.createElementNS("x", "y") with too few arguments must throw TypeError]
expected: FAIL
@ -62,9 +59,6 @@
[CaretPosition interface: attribute offset]
expected: FAIL
[Range interface: operation getBoundingClientRect()]
expected: FAIL
[Partial dictionary MouseEventInit: member names are unique]
expected: FAIL
@ -98,9 +92,6 @@
[CaretPosition interface: existence and properties of interface prototype object]
expected: FAIL
[Range interface: operation getClientRects()]
expected: FAIL
[Element interface: document.createElementNS("x", "y") must inherit property "convertRectFromNode(DOMRectReadOnly, GeometryNode, ConvertCoordinateOptions)" with the proper type]
expected: FAIL
@ -272,9 +263,6 @@
[Element interface: document.createElement("img") must inherit property "convertPointFromNode(DOMPointInit, GeometryNode, ConvertCoordinateOptions)" with the proper type]
expected: FAIL
[Range interface: new Range() must inherit property "getClientRects()" with the proper type]
expected: FAIL
[Window interface: window must inherit property "screenLeft" with the proper type]
expected: FAIL