Accepting the name of the event as a `DOMString` means that when events
are constructed from within Servo (for instance via input event
handling), the static strings are converted to an owned `String`
wrapped in a `DOMString` and then finally converted to an `Atom` in
`Event`. This makes it so that all non-generated `Event` constructors
accept `Atom`, which can avoid a conversion entirely when the atom
already exists on the Stylo atoms list and eliminate one in-memory copy
in the case that it isn't on the atom list.
Eventually, all event names can be on the atom list and we can eliminate
all copies. This is a tiny optimization, but also makes the code much
friendlier everywhere.
Testing: This should not change behavior so should be covered by
existing test.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
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>