mirror of
https://github.com/servo/servo.git
synced 2025-09-04 03:58:23 +01:00
script: Add FocusOptions
argument to Element.focus
and implement FocusOptions.preventScroll
(#38495)
This is an implementation of the `prevent_scroll` feature in the focus transaction system. It allows to control whether focusing an element should prevent scrolling or not. Spec: https://html.spec.whatwg.org/multipage/interaction.html#dom-focusoptions-preventscroll Testing: Existing WPT tests Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
This commit is contained in:
parent
2ac8665e03
commit
176e42d36d
14 changed files with 95 additions and 60 deletions
|
@ -5075,9 +5075,6 @@
|
|||
[SVGElement interface: attribute tabIndex]
|
||||
expected: FAIL
|
||||
|
||||
[SVGElement interface: operation focus(optional FocusOptions)]
|
||||
expected: FAIL
|
||||
|
||||
[SVGElement interface: operation blur()]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[preventScroll-nested-scroll-elements.html]
|
||||
[focus(options) - preventScroll on nested scroll elements]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[preventScroll-textarea.html]
|
||||
[preventScroll: true on a textarea element]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[preventScroll.html]
|
||||
[elm.focus({preventScroll: true})]
|
||||
expected: FAIL
|
|
@ -5,15 +5,9 @@
|
|||
[A with tabindex=invalid should not be focusable.]
|
||||
expected: FAIL
|
||||
|
||||
[#svg-a should not be focusable by default.]
|
||||
expected: FAIL
|
||||
|
||||
[input[type="hidden"\] should not be focusable by default.]
|
||||
expected: FAIL
|
||||
|
||||
[text with tabindex=0 should be focusable.]
|
||||
expected: FAIL
|
||||
|
||||
[IMG with tabindex=invalid should not be focusable.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -23,15 +17,6 @@
|
|||
[#summary-first should be focusable by default.]
|
||||
expected: FAIL
|
||||
|
||||
[a with tabindex=0 should be focusable.]
|
||||
expected: FAIL
|
||||
|
||||
[a with tabindex=-1 should be focusable.]
|
||||
expected: FAIL
|
||||
|
||||
[#svg-text should not be focusable by default.]
|
||||
expected: FAIL
|
||||
|
||||
[a should not be focusable by default.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -46,7 +31,3 @@
|
|||
|
||||
[a#with-href with tabindex=invalid should not be focusable.]
|
||||
expected: FAIL
|
||||
|
||||
[text with tabindex=-1 should be focusable.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue