mirror of
https://github.com/servo/servo
synced 2026-04-30 11:27:28 +02:00
script: Add support for the accesskey attribute (#43031)
This change adds support for the `accesskey` HTML attribute the corresponding behavior defined by the HTML standard. In addition to a new map holding a mapping between access key characters and a rooted reference to elements that use them, it adds a struct to represent the "Command" concept from the specification [^1], which seems to be used for `accesskey`. Not all command facets are implemented as some seem to be unused in the specification. [^1]: https://html.spec.whatwg.org/multipage/interactive-elements.html#commands Testing: This causes most access key tests to start passing. One test now only partially completes, because of a bug in the way that we fire synthetic mouse events. Fixes: This is part of #25001. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
@@ -155,7 +155,7 @@ impl HTMLOptionElement {
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#option-element-nearest-ancestor-select>
|
||||
fn nearest_ancestor_select(&self) -> Option<DomRoot<HTMLSelectElement>> {
|
||||
pub(crate) fn nearest_ancestor_select(&self) -> Option<DomRoot<HTMLSelectElement>> {
|
||||
// Step 1. Let ancestorOptgroup be null.
|
||||
// NOTE: We only care whether the value is non-null, so a boolean is enough
|
||||
let mut did_see_ancestor_optgroup = false;
|
||||
|
||||
Reference in New Issue
Block a user