From 10917ce73fe223500f646abd64df1eeea6953824 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Mon, 19 Jun 2017 15:44:00 -0700 Subject: [PATCH] Revert "Add pseudo-classes to match on the state of the "dir" attribute." for preventing me from backing out a gecko-side patch This reverts commit e4660c2b5b62779e25432e5acf9d091ce6f04ddc. --- components/style/element_state.rs | 12 ---- .../style/gecko/generated/structs_debug.rs | 72 +++++++++---------- .../style/gecko/generated/structs_release.rs | 72 +++++++++---------- .../style/gecko/non_ts_pseudo_class_list.rs | 4 -- components/style/gecko/wrapper.rs | 4 -- 5 files changed, 70 insertions(+), 94 deletions(-) diff --git a/components/style/element_state.rs b/components/style/element_state.rs index d8b4d680377..809f01218b0 100644 --- a/components/style/element_state.rs +++ b/components/style/element_state.rs @@ -120,18 +120,6 @@ bitflags! { const IN_LTR_STATE = 1 << 44, /// State that elements that match :dir(rtl) are in. const IN_RTL_STATE = 1 << 45, - /// State that HTML elements that have a "dir" attr are in. - const IN_HAS_DIR_ATTR_STATE = 1 << 46, - /// State that HTML elements with dir="ltr" (or something - /// case-insensitively equal to "ltr") are in. - const IN_HAS_DIR_ATTR_LTR_STATE = 1 << 47, - /// State that HTML elements with dir="rtl" (or something - /// case-insensitively equal to "rtl") are in. - const IN_HAS_DIR_ATTR_RTL_STATE = 1 << 48, - /// State that HTML elements without a valid-valued "dir" attr or - /// any HTML elements (including ) with dir="auto" (or something - /// case-insensitively equal to "auto") are in. - const IN_HAS_DIR_ATTR_LIKE_AUTO_STATE = 1 << 49, /// Non-standard & undocumented. const IN_AUTOFILL_STATE = 1 << 50, /// Non-standard & undocumented. diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index 2d509a1da8a..28161278e66 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -10668,32 +10668,28 @@ pub mod root { mozHandlerBlocked = 59, mozHandlerCrashed = 60, mozMathIncrementScriptLevel = 61, - mozHasDirAttr = 62, - mozDirAttrLTR = 63, - mozDirAttrRTL = 64, - mozDirAttrLikeAuto = 65, - mozAutofill = 66, - mozAutofillPreview = 67, - required = 68, - optional = 69, - valid = 70, - invalid = 71, - inRange = 72, - outOfRange = 73, - defaultPseudo = 74, - placeholderShown = 75, - mozReadOnly = 76, - mozReadWrite = 77, - mozSubmitInvalid = 78, - mozUIInvalid = 79, - mozUIValid = 80, - mozMeterOptimum = 81, - mozMeterSubOptimum = 82, - mozMeterSubSubOptimum = 83, - mozPlaceholder = 84, - Count = 85, - NotPseudo = 86, - MAX = 87, + mozAutofill = 62, + mozAutofillPreview = 63, + required = 64, + optional = 65, + valid = 66, + invalid = 67, + inRange = 68, + outOfRange = 69, + defaultPseudo = 70, + placeholderShown = 71, + mozReadOnly = 72, + mozReadWrite = 73, + mozSubmitInvalid = 74, + mozUIInvalid = 75, + mozUIValid = 76, + mozMeterOptimum = 77, + mozMeterSubOptimum = 78, + mozMeterSubSubOptimum = 79, + mozPlaceholder = 80, + Count = 81, + NotPseudo = 82, + MAX = 83, } #[repr(C)] #[derive(Debug)] @@ -16150,17 +16146,19 @@ pub mod root { NodeIsContent = 17, ElementHasAnimations = 18, NodeHasValidDirAttribute = 19, - NodeHasDirAutoSet = 20, - NodeHasTextNodeDirectionalityMap = 21, - NodeAncestorHasDirAuto = 22, - ElementIsInStyleScope = 23, - ElementIsScopedStyleRoot = 24, - NodeHandlingClick = 25, - NodeHasRelevantHoverRules = 26, - ElementHasWeirdParserInsertionMode = 27, - ParserHasNotified = 28, - MayBeApzAware = 29, - BooleanFlagCount = 30, + NodeHasFixedDir = 20, + NodeHasDirAutoSet = 21, + NodeHasTextNodeDirectionalityMap = 22, + NodeHasDirAuto = 23, + NodeAncestorHasDirAuto = 24, + ElementIsInStyleScope = 25, + ElementIsScopedStyleRoot = 26, + NodeHandlingClick = 27, + NodeHasRelevantHoverRules = 28, + ElementHasWeirdParserInsertionMode = 29, + ParserHasNotified = 30, + MayBeApzAware = 31, + BooleanFlagCount = 32, } #[repr(C)] #[derive(Debug, Copy)] diff --git a/components/style/gecko/generated/structs_release.rs b/components/style/gecko/generated/structs_release.rs index e026efef06a..f39368f0dff 100644 --- a/components/style/gecko/generated/structs_release.rs +++ b/components/style/gecko/generated/structs_release.rs @@ -10401,32 +10401,28 @@ pub mod root { mozHandlerBlocked = 59, mozHandlerCrashed = 60, mozMathIncrementScriptLevel = 61, - mozHasDirAttr = 62, - mozDirAttrLTR = 63, - mozDirAttrRTL = 64, - mozDirAttrLikeAuto = 65, - mozAutofill = 66, - mozAutofillPreview = 67, - required = 68, - optional = 69, - valid = 70, - invalid = 71, - inRange = 72, - outOfRange = 73, - defaultPseudo = 74, - placeholderShown = 75, - mozReadOnly = 76, - mozReadWrite = 77, - mozSubmitInvalid = 78, - mozUIInvalid = 79, - mozUIValid = 80, - mozMeterOptimum = 81, - mozMeterSubOptimum = 82, - mozMeterSubSubOptimum = 83, - mozPlaceholder = 84, - Count = 85, - NotPseudo = 86, - MAX = 87, + mozAutofill = 62, + mozAutofillPreview = 63, + required = 64, + optional = 65, + valid = 66, + invalid = 67, + inRange = 68, + outOfRange = 69, + defaultPseudo = 70, + placeholderShown = 71, + mozReadOnly = 72, + mozReadWrite = 73, + mozSubmitInvalid = 74, + mozUIInvalid = 75, + mozUIValid = 76, + mozMeterOptimum = 77, + mozMeterSubOptimum = 78, + mozMeterSubSubOptimum = 79, + mozPlaceholder = 80, + Count = 81, + NotPseudo = 82, + MAX = 83, } #[repr(C)] #[derive(Debug)] @@ -15786,17 +15782,19 @@ pub mod root { NodeIsContent = 17, ElementHasAnimations = 18, NodeHasValidDirAttribute = 19, - NodeHasDirAutoSet = 20, - NodeHasTextNodeDirectionalityMap = 21, - NodeAncestorHasDirAuto = 22, - ElementIsInStyleScope = 23, - ElementIsScopedStyleRoot = 24, - NodeHandlingClick = 25, - NodeHasRelevantHoverRules = 26, - ElementHasWeirdParserInsertionMode = 27, - ParserHasNotified = 28, - MayBeApzAware = 29, - BooleanFlagCount = 30, + NodeHasFixedDir = 20, + NodeHasDirAutoSet = 21, + NodeHasTextNodeDirectionalityMap = 22, + NodeHasDirAuto = 23, + NodeAncestorHasDirAuto = 24, + ElementIsInStyleScope = 25, + ElementIsScopedStyleRoot = 26, + NodeHandlingClick = 27, + NodeHasRelevantHoverRules = 28, + ElementHasWeirdParserInsertionMode = 29, + ParserHasNotified = 30, + MayBeApzAware = 31, + BooleanFlagCount = 32, } #[repr(C)] #[derive(Debug, Copy)] diff --git a/components/style/gecko/non_ts_pseudo_class_list.rs b/components/style/gecko/non_ts_pseudo_class_list.rs index a6c3549bafa..12c1fa21d1f 100644 --- a/components/style/gecko/non_ts_pseudo_class_list.rs +++ b/components/style/gecko/non_ts_pseudo_class_list.rs @@ -72,10 +72,6 @@ macro_rules! apply_non_ts_list { ("-moz-broken", MozBroken, mozBroken, IN_BROKEN_STATE, _), ("-moz-loading", MozLoading, mozLoading, IN_LOADING_STATE, _), ("-moz-suppressed", MozSuppressed, mozSuppressed, IN_SUPPRESSED_STATE, PSEUDO_CLASS_INTERNAL), - ("-moz-has-dir-attr", MozHasDirAttr, mozHasDirAttr, IN_HAS_DIR_ATTR_STATE, PSEUDO_CLASS_INTERNAL), - ("-moz-dir-attr-ltr", MozDirAttrLTR, mozDirAttrLTR, IN_HAS_DIR_ATTR_LTR_STATE, PSEUDO_CLASS_INTERNAL), - ("-moz-dir-attr-rtl", MozDirAttrRTL, mozDirAttrRTL, IN_HAS_DIR_ATTR_RTL_STATE, PSEUDO_CLASS_INTERNAL), - ("-moz-dir-attr-like-auto", MozDirAttrLikeAuto, mozDirAttrLikeAuto, IN_HAS_DIR_ATTR_LIKE_AUTO_STATE, PSEUDO_CLASS_INTERNAL), ("-moz-autofill", MozAutofill, mozAutofill, IN_AUTOFILL_STATE, PSEUDO_CLASS_INTERNAL), ("-moz-autofill-preview", MozAutofillPreview, mozAutofillPreview, IN_AUTOFILL_PREVIEW_STATE, PSEUDO_CLASS_INTERNAL), diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index e997486b1d3..9c99ead1fe4 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1517,10 +1517,6 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { NonTSPseudoClass::MozMeterOptimum | NonTSPseudoClass::MozMeterSubOptimum | NonTSPseudoClass::MozMeterSubSubOptimum | - NonTSPseudoClass::MozHasDirAttr | - NonTSPseudoClass::MozDirAttrLTR | - NonTSPseudoClass::MozDirAttrRTL | - NonTSPseudoClass::MozDirAttrLikeAuto | NonTSPseudoClass::MozAutofill | NonTSPseudoClass::MozAutofillPreview => { self.get_state().intersects(pseudo_class.state_flag())