Bug 1082899 patch 4 - Rename existing flag for pseudo-elements to better match what it is (UA sheets, not chrome sheets, although EditorOverride is included). r=birtles
authorL. David Baron <dbaron@dbaron.org>
Thu, 23 Oct 2014 12:57:28 -0400
changeset 211912 858d2174b9c1044cf3ee4c612de7755a6fc62076
parent 211911 6925c2f5d70156de2e7ed5b47c64b05a4590bdb2
child 211913 550bb1f5b80183513752d3702b9fb0a011cf9cea
push id50852
push userdbaron@mozilla.com
push dateThu, 23 Oct 2014 16:58:05 +0000
treeherdermozilla-inbound@1ac58452ef7d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1082899
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1082899 patch 4 - Rename existing flag for pseudo-elements to better match what it is (UA sheets, not chrome sheets, although EditorOverride is included). r=birtles
layout/style/nsCSSParser.cpp
layout/style/nsCSSPseudoElementList.h
layout/style/nsCSSPseudoElements.h
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -5390,17 +5390,17 @@ CSSParserImpl::ParsePseudoSelector(int32
     nsCSSPseudoElements::GetPseudoType(pseudo);
   nsCSSPseudoClasses::Type pseudoClassType =
     nsCSSPseudoClasses::GetPseudoType(pseudo);
   bool pseudoClassIsUserAction =
     nsCSSPseudoClasses::IsUserActionPseudoClass(pseudoClassType);
 
   if (!mUnsafeRulesEnabled &&
       ((pseudoElementType < nsCSSPseudoElements::ePseudo_PseudoElementCount &&
-        nsCSSPseudoElements::PseudoElementIsChromeOnly(pseudoElementType)) ||
+        nsCSSPseudoElements::PseudoElementIsUASheetOnly(pseudoElementType)) ||
        (pseudoClassType != nsCSSPseudoClasses::ePseudoClass_NotPseudoClass &&
         nsCSSPseudoClasses::PseudoClassIsUASheetOnly(pseudoClassType)))) {
     // This pseudo-element or pseudo-class is not exposed to content.
     REPORT_UNEXPECTED_TOKEN(PEPseudoSelUnknown);
     UngetToken();
     return eSelectorParsingStatus_Error;
   }
 
--- a/layout/style/nsCSSPseudoElementList.h
+++ b/layout/style/nsCSSPseudoElementList.h
@@ -48,29 +48,29 @@ CSS_PSEUDO_ELEMENT(mozFocusOuter, ":-moz
 CSS_PSEUDO_ELEMENT(mozListBullet, ":-moz-list-bullet", 0)
 CSS_PSEUDO_ELEMENT(mozListNumber, ":-moz-list-number", 0)
 
 CSS_PSEUDO_ELEMENT(mozMathAnonymous, ":-moz-math-anonymous", 0)
 
 // HTML5 Forms pseudo elements
 CSS_PSEUDO_ELEMENT(mozNumberWrapper, ":-moz-number-wrapper",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE |
-                   CSS_PSEUDO_ELEMENT_IS_CHROME_ONLY)
+                   CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY)
 CSS_PSEUDO_ELEMENT(mozNumberText, ":-moz-number-text",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE |
-                   CSS_PSEUDO_ELEMENT_IS_CHROME_ONLY)
+                   CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY)
 CSS_PSEUDO_ELEMENT(mozNumberSpinBox, ":-moz-number-spin-box",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE |
-                   CSS_PSEUDO_ELEMENT_IS_CHROME_ONLY)
+                   CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY)
 CSS_PSEUDO_ELEMENT(mozNumberSpinUp, ":-moz-number-spin-up",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE |
-                   CSS_PSEUDO_ELEMENT_IS_CHROME_ONLY)
+                   CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY)
 CSS_PSEUDO_ELEMENT(mozNumberSpinDown, ":-moz-number-spin-down",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE |
-                   CSS_PSEUDO_ELEMENT_IS_CHROME_ONLY)
+                   CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY)
 CSS_PSEUDO_ELEMENT(mozProgressBar, ":-moz-progress-bar",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE)
 CSS_PSEUDO_ELEMENT(mozRangeTrack, ":-moz-range-track",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE)
 CSS_PSEUDO_ELEMENT(mozRangeProgress, ":-moz-range-progress",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE)
 CSS_PSEUDO_ELEMENT(mozRangeThumb, ":-moz-range-thumb",
                    CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE)
--- a/layout/style/nsCSSPseudoElements.h
+++ b/layout/style/nsCSSPseudoElements.h
@@ -28,17 +28,17 @@
 #define CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE    (1<<2)
 // Flag that indicate the pseudo-element supports a user action pseudo-class
 // following it, such as :active or :hover.  This would normally correspond
 // to whether the pseudo-element is tree-like, but we don't support these
 // pseudo-classes on ::before and ::after generated content yet.  See
 // http://dev.w3.org/csswg/selectors4/#pseudo-elements.
 #define CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE  (1<<3)
 // Is content prevented from parsing selectors containing this pseudo-element?
-#define CSS_PSEUDO_ELEMENT_IS_CHROME_ONLY              (1<<4)
+#define CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY               (1<<4)
 
 // Empty class derived from nsIAtom so that function signatures can
 // require an atom from this atom list.
 class nsICSSPseudoElement : public nsIAtom {};
 
 class nsCSSPseudoElements {
 public:
 
@@ -80,19 +80,19 @@ public:
 
   static bool PseudoElementSupportsStyleAttribute(const Type aType) {
     MOZ_ASSERT(aType < ePseudo_PseudoElementCount);
     return PseudoElementHasFlags(aType, CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE);
   }
 
   static bool PseudoElementSupportsUserActionState(const Type aType);
 
-  static bool PseudoElementIsChromeOnly(const Type aType) {
+  static bool PseudoElementIsUASheetOnly(const Type aType) {
     MOZ_ASSERT(aType < ePseudo_PseudoElementCount);
-    return PseudoElementHasFlags(aType, CSS_PSEUDO_ELEMENT_IS_CHROME_ONLY);
+    return PseudoElementHasFlags(aType, CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY);
   }
 
 private:
   static uint32_t FlagsForPseudoElement(const Type aType);
 
   // Does the given pseudo-element have all of the flags given?
   static bool PseudoElementHasFlags(const Type aType, uint32_t aFlags)
   {