Auto merge of #17415 - KWierso:backout17409, r=jdm

Revert "Add pseudo-classes to match on the state of the "dir" attribute." for preventing me from backing out a gecko-side patch

The gecko patches in bug 1373798 broke some gecko-side tests, but they also fixed a stylo build failure that started when this commit merged from servo to autoland, so this needs to get reverted so I can cleanly back out those gecko patches.

This reverts commit e4660c2b5b.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17415)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-06-19 17:21:29 -07:00 committed by GitHub
commit fa72cd04d9
5 changed files with 70 additions and 94 deletions

View file

@ -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 <bdi> elements without a valid-valued "dir" attr or
/// any HTML elements (including <bdi>) 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.

View file

@ -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)]

View file

@ -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)]

View file

@ -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),

View file

@ -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())