From 6db3b1158c22a983b8171949c2753557a55e50c0 Mon Sep 17 00:00:00 2001 From: Cathie Chen Date: Wed, 22 Mar 2023 17:51:09 +0000 Subject: [PATCH] style: Update UA stylesheet for popover Differential Revision: https://phabricator.services.mozilla.com/D172700 --- components/style/gecko/media_features.rs | 7 ++++++- components/style/gecko/non_ts_pseudo_class_list.rs | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/style/gecko/media_features.rs b/components/style/gecko/media_features.rs index ba1f0c8845a..7b014b24159 100644 --- a/components/style/gecko/media_features.rs +++ b/components/style/gecko/media_features.rs @@ -643,7 +643,7 @@ macro_rules! bool_pref_feature { /// to support new types in these entries and (2) ensuring that either /// nsPresContext::MediaFeatureValuesChanged is called when the value that /// would be returned by the evaluator function could change. -pub static MEDIA_FEATURES: [QueryFeatureDescription; 64] = [ +pub static MEDIA_FEATURES: [QueryFeatureDescription; 65] = [ feature!( atom!("width"), AllowsRanges::Yes, @@ -957,4 +957,9 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 64] = [ atom!("-moz-mathml-core-ms"), "mathml.ms_lquote_rquote_attributes.disabled" ), + // media query for popover attribute + bool_pref_feature!( + atom!("-moz-popover-enabled"), + "dom.element.popover.enabled" + ), ]; diff --git a/components/style/gecko/non_ts_pseudo_class_list.rs b/components/style/gecko/non_ts_pseudo_class_list.rs index 0a7fce46263..90533295b81 100644 --- a/components/style/gecko/non_ts_pseudo_class_list.rs +++ b/components/style/gecko/non_ts_pseudo_class_list.rs @@ -39,7 +39,7 @@ macro_rules! apply_non_ts_list { ("active", Active, ACTIVE, _), ("autofill", Autofill, AUTOFILL, _), ("checked", Checked, CHECKED, _), - ("closed", Closed, CLOSED, _), + ("closed", Closed, CLOSED, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME), ("defined", Defined, DEFINED, _), ("disabled", Disabled, DISABLED, _), ("enabled", Enabled, ENABLED, _), @@ -70,7 +70,7 @@ macro_rules! apply_non_ts_list { ("-moz-math-increment-script-level", MozMathIncrementScriptLevel, INCREMENT_SCRIPT_LEVEL, _), ("required", Required, REQUIRED, _), - ("open", Open, OPEN, _), + ("open", Open, OPEN, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME), ("optional", Optional, OPTIONAL_, _), ("valid", Valid, VALID, _), ("invalid", Invalid, INVALID, _),