mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: Distinguish between sequential (keyboard) and click focusability (#43019)
This changes makes it so that keyboard and click focusability are two separate concepts in `script`. Some elements may be focusable only by the keyboard and some only by the click events. In addition, the `SEQUENTIALLY_FOCUSABLE` `Node` flag is removed in favor of a more specification-aligned approach of checking lazily if an element is a focusable area. This allows moving the focus fixup steps to their correct place, asynchronously during "update the rendering" and synchronously during `unbind_from_tree`. Testing: This causes some WPT tests to start passing and some to start failing: - Two subtests tests in `tests/wpt/meta/css/css-conditional/container-queries/` because we do not implement support for container queries. These are legitimate failures and they are compensated by a good subtest pass in the same file. - A few subtests in `/html/interaction/focus/tabindex-focus-flag.html` because now we do not allow focusing non-rendering elements. The failures are HTML elements with `<svg>` which we do not rendering and `<summary>` elements of `<details>` which need special handling we do not implement yet. - `html/semantics/forms/the-fieldset-element/disabled-003.html`: Some of these tests start to fail, but they are not spec compliant and browser properly implementing the asynchronous focus fixup rule also fail them. Fixes: #31870. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
@@ -620,7 +620,6 @@ impl VirtualMethods for HTMLTextAreaElement {
|
||||
}
|
||||
},
|
||||
}
|
||||
el.update_sequentially_focusable_status(CanGc::note());
|
||||
},
|
||||
local_name!("maxlength") => match *attr.value() {
|
||||
AttrValue::Int(_, value) => {
|
||||
|
||||
Reference in New Issue
Block a user