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

@ -0,0 +1,3 @@
[preventScroll-nested-scroll-elements.html]
[focus(options) - preventScroll on nested scroll elements]
expected: FAIL

View file

@ -0,0 +1,3 @@
[preventScroll-textarea.html]
[preventScroll: true on a textarea element]
expected: FAIL

View file

@ -1,18 +1,3 @@
[preventScroll.html]
[Sanity test]
expected: FAIL
[elm.focus() without arguments]
expected: FAIL
[elm.focus(undefined)]
expected: FAIL
[elm.focus(null)]
expected: FAIL
[elm.focus({})]
expected: FAIL
[elm.focus({preventScroll: false})]
[elm.focus({preventScroll: true})]
expected: FAIL

View file

@ -1,4 +0,0 @@
[textarea-scroll-selection.html]
[programatic focus() scrolls selection into view including ancestors]
expected: FAIL