Skip to content

Commit

Permalink
style: Replace popover's ':open' and ':closed' pseudo-classes with ':…
Browse files Browse the repository at this point in the history
…popover-open'

See whatwg/html#9077.

Differential Revision: https://phabricator.services.mozilla.com/D175223
  • Loading branch information
mbrodesser-Igalia authored and Loirooriol committed Nov 18, 2023
1 parent bc6f959 commit ce2f793
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions components/style/gecko/non_ts_pseudo_class_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ macro_rules! apply_non_ts_list {
("active", Active, ACTIVE, _),
("autofill", Autofill, AUTOFILL, _),
("checked", Checked, CHECKED, _),
("closed", Closed, CLOSED, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
("defined", Defined, DEFINED, _),
("disabled", Disabled, DISABLED, _),
("enabled", Enabled, ENABLED, _),
Expand Down Expand Up @@ -70,7 +69,7 @@ macro_rules! apply_non_ts_list {
("-moz-math-increment-script-level", MozMathIncrementScriptLevel, INCREMENT_SCRIPT_LEVEL, _),

("required", Required, REQUIRED, _),
("open", Open, OPEN, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
("popover-open", PopoverOpen, POPOVER_OPEN, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
("optional", Optional, OPTIONAL_, _),
("valid", Valid, VALID, _),
("invalid", Invalid, INVALID, _),
Expand Down
2 changes: 1 addition & 1 deletion components/style/gecko/selector_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl NonTSPseudoClass {
/// Returns whether the pseudo-class is enabled in content sheets.
#[inline]
fn is_enabled_in_content(&self) -> bool {
if matches!(*self, Self::Open | Self::Closed) {
if matches!(*self, Self::PopoverOpen) {
return static_prefs::pref!("dom.element.popover.enabled");
}
!self.has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME)
Expand Down
3 changes: 1 addition & 2 deletions components/style/gecko/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2001,11 +2001,10 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
NonTSPseudoClass::Enabled |
NonTSPseudoClass::Disabled |
NonTSPseudoClass::Checked |
NonTSPseudoClass::Closed |
NonTSPseudoClass::Fullscreen |
NonTSPseudoClass::Indeterminate |
NonTSPseudoClass::MozInert |
NonTSPseudoClass::Open |
NonTSPseudoClass::PopoverOpen |
NonTSPseudoClass::PlaceholderShown |
NonTSPseudoClass::Target |
NonTSPseudoClass::Valid |
Expand Down

0 comments on commit ce2f793

Please sign in to comment.