mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Make focus-visible match the spec more closely.
The spec text has been improved a while ago, so I think we should do this. This keeps the current moz-focusring behavior when the pref is disabled, but when enabled it becomes effectively an alias of focus-visible. Differential Revision: https://phabricator.services.mozilla.com/D96697
This commit is contained in:
parent
e1bf1648c7
commit
4771d7ddf0
2 changed files with 3 additions and 5 deletions
|
@ -103,6 +103,8 @@ bitflags! {
|
|||
/// Non-standard & undocumented.
|
||||
const IN_INCREMENT_SCRIPT_LEVEL_STATE = 1 << 38;
|
||||
/// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-focusring
|
||||
///
|
||||
/// But also https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
|
||||
const IN_FOCUSRING_STATE = 1 << 39;
|
||||
/// Non-standard & undocumented.
|
||||
const IN_HANDLER_CLICK_TO_PLAY_STATE = 1 << 40;
|
||||
|
@ -133,10 +135,6 @@ bitflags! {
|
|||
const IN_AUTOFILL_STATE = 1 << 50;
|
||||
/// Non-standard & undocumented.
|
||||
const IN_AUTOFILL_PREVIEW_STATE = 1 << 51;
|
||||
/// :focus-visible
|
||||
///
|
||||
/// https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
|
||||
const IN_FOCUS_VISIBLE_STATE = 1 << 52;
|
||||
/// State that dialog element is modal, for centered alignment
|
||||
///
|
||||
/// https://html.spec.whatwg.org/multipage/#centered-alignment
|
||||
|
|
|
@ -43,7 +43,7 @@ macro_rules! apply_non_ts_list {
|
|||
("enabled", Enabled, IN_ENABLED_STATE, _),
|
||||
("focus", Focus, IN_FOCUS_STATE, _),
|
||||
("focus-within", FocusWithin, IN_FOCUS_WITHIN_STATE, _),
|
||||
("focus-visible", FocusVisible, IN_FOCUS_VISIBLE_STATE, _),
|
||||
("focus-visible", FocusVisible, IN_FOCUSRING_STATE, _),
|
||||
("hover", Hover, IN_HOVER_STATE, _),
|
||||
("-moz-drag-over", MozDragOver, IN_DRAGOVER_STATE, _),
|
||||
("target", Target, IN_TARGET_STATE, _),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue