script: Implement scrollIntoView (#38230)

This is an implementation for `scrollIntoView`. For now, it is called
when a certain element gains focus.

Testing: Existing WPT tests
Fixes: #24059

Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
This commit is contained in:
Abdelrahman Hossam 2025-08-06 16:08:25 +08:00 committed by GitHub
parent dcb90bb85e
commit 17a269a8ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 492 additions and 318 deletions

View file

@ -266,9 +266,6 @@
[Element interface: document.createElement("div") must inherit property "scrollIntoView([object Object\],[object Object\])" with the proper type]
expected: FAIL
[Element interface: calling scrollIntoView(optional (boolean or ScrollIntoViewOptions)) on document.createElement("img") with too few arguments must throw TypeError]
expected: FAIL
[Element interface: document.createElement("img") must inherit property "convertQuadFromNode(DOMQuadInit, GeometryNode, optional ConvertCoordinateOptions)" with the proper type]
expected: FAIL
@ -278,9 +275,6 @@
[CSSPseudoElement interface: operation convertPointFromNode(DOMPointInit, GeometryNode, optional ConvertCoordinateOptions)]
expected: FAIL
[Element interface: document.createElementNS("x", "y") must inherit property "scrollIntoView(optional (boolean or ScrollIntoViewOptions))" with the proper type]
expected: FAIL
[Element interface: document.createElement("img") must inherit property "getBoxQuads(optional BoxQuadOptions)" with the proper type]
expected: FAIL
@ -401,15 +395,6 @@
[Text interface: calling getBoxQuads(optional BoxQuadOptions) on document.createTextNode("x") with too few arguments must throw TypeError]
expected: FAIL
[Element interface: calling scrollIntoView(optional (boolean or ScrollIntoViewOptions)) on document.createElement("div") with too few arguments must throw TypeError]
expected: FAIL
[Element interface: document.createElement("img") must inherit property "scrollIntoView(optional (boolean or ScrollIntoViewOptions))" with the proper type]
expected: FAIL
[Element interface: operation scrollIntoView(optional (boolean or ScrollIntoViewOptions))]
expected: FAIL
[Document interface: document must inherit property "convertPointFromNode(DOMPointInit, GeometryNode, optional ConvertCoordinateOptions)" with the proper type]
expected: FAIL
@ -422,12 +407,6 @@
[CSSPseudoElement interface: operation getBoxQuads(optional BoxQuadOptions)]
expected: FAIL
[Element interface: calling scrollIntoView(optional (boolean or ScrollIntoViewOptions)) on document.createElementNS("x", "y") with too few arguments must throw TypeError]
expected: FAIL
[Element interface: document.createElement("div") must inherit property "scrollIntoView(optional (boolean or ScrollIntoViewOptions))" with the proper type]
expected: FAIL
[Element interface: document.createElementNS("x", "y") must inherit property "convertRectFromNode(DOMRectReadOnly, GeometryNode, optional ConvertCoordinateOptions)" with the proper type]
expected: FAIL