Bug 1250820 - Part 3: Replace notPseudo with negation. r=heycam
authorBoris Chiou <boris.chiou@gmail.com>
Fri, 22 Apr 2016 22:09:20 +0800
changeset 295697 c0f1d0e943fdb51ac190a11a178a5fb4d83dced6
parent 295696 544087bac14c7c83bf38254f7478f5a052863387
child 295698 4ff09a13c4fb5747e2781da6a9b98a47ca36fbb5
push id19015
push usercbook@mozilla.com
push dateMon, 02 May 2016 09:39:23 +0000
treeherderfx-team@2080375bc69d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1250820
milestone49.0a1
Bug 1250820 - Part 3: Replace notPseudo with negation. r=heycam notPseudo is easy to be confused with NotPseudo, so using negation would be better. MozReview-Commit-ID: BtlS1A5YgD3
layout/style/nsCSSParser.cpp
layout/style/nsCSSPseudoClassList.h
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -5988,17 +5988,17 @@ CSSParserImpl::ParsePseudoSelector(int32
 
   // If it's a function token, it better be on our "ok" list, and if the name
   // is that of a function pseudo it better be a function token
   if ((eCSSToken_Function == mToken.mType) !=
       (
 #ifdef MOZ_XUL
        isTree ||
 #endif
-       CSSPseudoClassType::notPseudo == pseudoClassType ||
+       CSSPseudoClassType::negation == pseudoClassType ||
        nsCSSPseudoClasses::HasStringArg(pseudoClassType) ||
        nsCSSPseudoClasses::HasNthPairArg(pseudoClassType) ||
        nsCSSPseudoClasses::HasSelectorListArg(pseudoClassType))) {
     // There are no other function pseudos
     REPORT_UNEXPECTED_TOKEN(PEPseudoSelNonFunc);
     UngetToken();
     return eSelectorParsingStatus_Error;
   }
@@ -6008,17 +6008,17 @@ CSSParserImpl::ParsePseudoSelector(int32
       !isPseudoElement &&
       !isAnonBox) {
     REPORT_UNEXPECTED_TOKEN(PEPseudoSelNotPE);
     UngetToken();
     return eSelectorParsingStatus_Error;
   }
 
   if (!parsingPseudoElement &&
-      CSSPseudoClassType::notPseudo == pseudoClassType) {
+      CSSPseudoClassType::negation == pseudoClassType) {
     if (aIsNegated) { // :not() can't be itself negated
       REPORT_UNEXPECTED_TOKEN(PEPseudoSelDoubleNot);
       UngetToken();
       return eSelectorParsingStatus_Error;
     }
     // CSS 3 Negation pseudo-class takes one simple selector as argument
     nsSelectorParsingStatus parsingStatus =
       ParseNegatedSimpleSelector(aDataMask, aSelector);
--- a/layout/style/nsCSSPseudoClassList.h
+++ b/layout/style/nsCSSPseudoClassList.h
@@ -127,17 +127,17 @@ CSS_PSEUDO_CLASS(mozBrowserFrame, ":-moz
                  CSS_PSEUDO_CLASS_UA_SHEET_AND_CHROME, "")
 
 // Matches whatever the contextual reference elements are for the
 // matching operation.
 CSS_PSEUDO_CLASS(scope, ":scope", 0, "layout.css.scope-pseudo.enabled")
 
 // :not needs to come at the end of the non-bit pseudo-class list, since
 // it doesn't actually get directly matched on in SelectorMatches.
-CSS_PSEUDO_CLASS(notPseudo, ":not", 0, "")
+CSS_PSEUDO_CLASS(negation, ":not", 0, "")
 
 // :-moz-dir(ltr) and :-moz-dir(rtl) match elements whose resolved
 // directionality in the markup language is ltr or rtl respectively
 CSS_STATE_DEPENDENT_PSEUDO_CLASS(dir, ":-moz-dir", 0, "",
                                  NS_EVENT_STATE_LTR | NS_EVENT_STATE_RTL)
 
 CSS_STATE_PSEUDO_CLASS(link, ":link", 0, "", NS_EVENT_STATE_UNVISITED)
 // what matches :link or :visited