Bug 1155030 - Fix asterix/asterisk misspelling. r=ehsan
authorCameron McCormack <cam@mcc.id.au>
Fri, 17 Apr 2015 11:09:58 +1000
changeset 239670 d310babb2ca1a8d659563d7c3a84d5a3e3c54be9
parent 239669 cb5da5c1c20920905f35f102d2a1c798530eaca2
child 239671 e635a06abc1b7b120fbc8ec51316690f31709a3b
push id28606
push userryanvm@gmail.com
push dateFri, 17 Apr 2015 19:45:37 +0000
treeherdermozilla-central@a55f9bdb2bf4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1155030
milestone40.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 1155030 - Fix asterix/asterisk misspelling. r=ehsan
dom/base/FragmentOrElement.cpp
dom/base/nsContentList.cpp
dom/base/nsDocument.cpp
dom/base/nsGkAtomList.h
dom/xslt/xpath/txExprLexer.cpp
dom/xslt/xpath/txExprLexer.h
dom/xslt/xpath/txNameTest.cpp
dom/xslt/xpath/txXPathOptimizer.cpp
dom/xslt/xslt/txStylesheetCompileHandlers.cpp
dom/xslt/xslt/txXSLTNumber.cpp
dom/xul/XULDocument.cpp
layout/reftests/first-letter/399941-5-ref.html
layout/reftests/first-letter/399941-5.html
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -451,17 +451,17 @@ nsChildContentList::IndexOf(nsIContent* 
 
 nsIHTMLCollection*
 FragmentOrElement::Children()
 {
   FragmentOrElement::nsDOMSlots *slots = DOMSlots();
 
   if (!slots->mChildrenList) {
     slots->mChildrenList = new nsContentList(this, kNameSpaceID_Wildcard, 
-                                             nsGkAtoms::_asterix, nsGkAtoms::_asterix,
+                                             nsGkAtoms::_asterisk, nsGkAtoms::_asterisk,
                                              false);
   }
 
   return slots->mChildrenList;
 }
 
 
 //----------------------------------------------------------------------
--- a/dom/base/nsContentList.cpp
+++ b/dom/base/nsContentList.cpp
@@ -399,18 +399,18 @@ nsContentList::nsContentList(nsINode* aR
     mFunc(nullptr),
     mDestroyFunc(nullptr),
     mData(nullptr),
     mState(LIST_DIRTY),
     mDeep(aDeep),
     mFuncMayDependOnAttr(false)
 {
   NS_ASSERTION(mRootNode, "Must have root");
-  if (nsGkAtoms::_asterix == mHTMLMatchAtom) {
-    NS_ASSERTION(mXMLMatchAtom == nsGkAtoms::_asterix, "HTML atom and XML atom are not both asterix?");
+  if (nsGkAtoms::_asterisk == mHTMLMatchAtom) {
+    NS_ASSERTION(mXMLMatchAtom == nsGkAtoms::_asterisk, "HTML atom and XML atom are not both asterisk?");
     mMatchAll = true;
   }
   else {
     mMatchAll = false;
   }
   mRootNode->AddMutationObserver(this);
 
   // We only need to flush if we're in an non-HTML document, since the
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -10826,18 +10826,18 @@ nsIDocument::ObsoleteSheet(const nsAStri
   }
 }
 
 nsIHTMLCollection*
 nsIDocument::Children()
 {
   if (!mChildrenCollection) {
     mChildrenCollection = new nsContentList(this, kNameSpaceID_Wildcard,
-                                            nsGkAtoms::_asterix,
-                                            nsGkAtoms::_asterix,
+                                            nsGkAtoms::_asterisk,
+                                            nsGkAtoms::_asterisk,
                                             false);
   }
 
   return mChildrenCollection;
 }
 
 uint32_t
 nsIDocument::ChildElementCount()
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -45,17 +45,17 @@ GK_ATOM(mozgeneratedcontentafter, "_moz_
 GK_ATOM(mozgeneratedcontentimage, "_moz_generated_content_image")
 GK_ATOM(mozquote, "_moz_quote")
 GK_ATOM(mozsignature, "moz-signature")
 GK_ATOM(_moz_is_glyph, "-moz-is-glyph")
 GK_ATOM(_moz_original_size, "_moz_original_size")
 GK_ATOM(_moz_target, "_moz_target")
 GK_ATOM(menuactive, "_moz-menuactive")
 GK_ATOM(_poundDefault, "#default")
-GK_ATOM(_asterix, "*")
+GK_ATOM(_asterisk, "*")
 GK_ATOM(a, "a")
 GK_ATOM(abbr, "abbr")
 GK_ATOM(abort, "abort")
 GK_ATOM(above, "above")
 GK_ATOM(acceltext, "acceltext")
 GK_ATOM(accept, "accept")
 GK_ATOM(acceptcharset, "accept-charset")
 GK_ATOM(accesskey, "accesskey")
--- a/dom/xslt/xpath/txExprLexer.cpp
+++ b/dom/xslt/xpath/txExprLexer.cpp
@@ -279,17 +279,17 @@ txExprLexer::parse(const nsASingleFragme
         else {
           newToken = new Token(mPosition - 1, Token::GREATER_THAN_OP);
         }
         break;
       case HYPHEN :
         newToken = new Token(mPosition, Token::SUBTRACTION_OP);
         ++mPosition;
         break;
-      case ASTERIX:
+      case ASTERISK:
         if (nextIsOperatorToken(prevToken)) {
           newToken = new Token(mPosition, Token::MULTIPLY_OP);
         }
         else {
           newToken = new Token(mPosition, Token::CNAME);
         }
         ++mPosition;
         break;
--- a/dom/xslt/xpath/txExprLexer.h
+++ b/dom/xslt/xpath/txExprLexer.h
@@ -173,17 +173,17 @@ public:
         L_PAREN        = '(',
         R_PAREN        = ')',
         L_BRACKET      = '[',
         R_BRACKET      = ']',
         L_ANGLE        = '<',
         R_ANGLE        = '>',
         COMMA          = ',',
         PERIOD         = '.',
-        ASTERIX        = '*',
+        ASTERISK       = '*',
         FORWARD_SLASH  = '/',
         EQUAL          = '=',
         BANG           = '!',
         VERT_BAR       = '|',
         AT_SIGN        = '@',
         DOLLAR_SIGN    = '$',
         PLUS           = '+',
         HYPHEN         = '-',
--- a/dom/xslt/xpath/txNameTest.cpp
+++ b/dom/xslt/xpath/txNameTest.cpp
@@ -30,40 +30,40 @@ bool txNameTest::matches(const txXPathNo
         (mNodeType == txXPathNodeType::ATTRIBUTE_NODE &&
          !txXPathNodeUtils::isAttribute(aNode)) ||
         (mNodeType == txXPathNodeType::DOCUMENT_NODE &&
          !txXPathNodeUtils::isRoot(aNode))) {
         return false;
     }
 
     // Totally wild?
-    if (mLocalName == nsGkAtoms::_asterix && !mPrefix)
+    if (mLocalName == nsGkAtoms::_asterisk && !mPrefix)
         return true;
 
     // Compare namespaces
     if (mNamespace != txXPathNodeUtils::getNamespaceID(aNode) 
         && !(mNamespace == kNameSpaceID_None &&
              txXPathNodeUtils::isHTMLElementInHTMLDocument(aNode))
        )
         return false;
 
     // Name wild?
-    if (mLocalName == nsGkAtoms::_asterix)
+    if (mLocalName == nsGkAtoms::_asterisk)
         return true;
 
     // Compare local-names
     return txXPathNodeUtils::localNameEquals(aNode, mLocalName);
 }
 
 /*
  * Returns the default priority of this txNodeTest
  */
 double txNameTest::getDefaultPriority()
 {
-    if (mLocalName == nsGkAtoms::_asterix) {
+    if (mLocalName == nsGkAtoms::_asterisk) {
         if (!mPrefix)
             return -0.5;
         return -0.25;
     }
     return 0;
 }
 
 txNodeTest::NodeTestType
--- a/dom/xslt/xpath/txXPathOptimizer.cpp
+++ b/dom/xslt/xpath/txXPathOptimizer.cpp
@@ -123,17 +123,17 @@ txXPathOptimizer::optimizeStep(Expr* aIn
     LocationStep* step = static_cast<LocationStep*>(aInExpr);
 
     if (step->getAxisIdentifier() == LocationStep::ATTRIBUTE_AXIS) {
         // Test for @foo type steps.
         txNameTest* nameTest = nullptr;
         if (!step->getSubExprAt(0) &&
             step->getNodeTest()->getType() == txNameTest::NAME_TEST &&
             (nameTest = static_cast<txNameTest*>(step->getNodeTest()))->
-                mLocalName != nsGkAtoms::_asterix) {
+                mLocalName != nsGkAtoms::_asterisk) {
 
             *aOutExpr = new txNamedAttributeStep(nameTest->mNamespace,
                                                  nameTest->mPrefix,
                                                  nameTest->mLocalName);
             NS_ENSURE_TRUE(*aOutExpr, NS_ERROR_OUT_OF_MEMORY);
 
             return NS_OK; // return since we no longer have a step-object.
         }
--- a/dom/xslt/xslt/txStylesheetCompileHandlers.cpp
+++ b/dom/xslt/xslt/txStylesheetCompileHandlers.cpp
@@ -1057,17 +1057,17 @@ txFnStartStripSpace(int32_t aNamespaceID
                                           getter_AddRefs(prefix),
                                           getter_AddRefs(localName));
                 if (NS_FAILED(rv) || prefix) {
                     // bad chars or two ':'
                     return NS_ERROR_XSLT_PARSE_FAILURE;
                 }
                 prefix = localName;
             }
-            localName = nsGkAtoms::_asterix;
+            localName = nsGkAtoms::_asterisk;
         }
         if (prefix) {
             ns = aState.mElementContext->mMappings->lookupNamespace(prefix);
             NS_ENSURE_TRUE(ns != kNameSpaceID_Unknown, NS_ERROR_FAILURE);
         }
         nsAutoPtr<txStripSpaceTest> sst(new txStripSpaceTest(prefix, localName,
                                                              ns, strip));
         NS_ENSURE_TRUE(sst, NS_ERROR_OUT_OF_MEMORY);
--- a/dom/xslt/xslt/txXSLTNumber.cpp
+++ b/dom/xslt/xslt/txXSLTNumber.cpp
@@ -151,17 +151,17 @@ txXSLTNumber::getValueList(Expr* aValueE
                 break;
             }
             case txXPathNodeType::DOCUMENT_NODE:
             case txXPathNodeType::ATTRIBUTE_NODE:
             default:
             {
                 // this won't match anything as we walk up the tree
                 // but it's what the spec says to do
-                nodeTest = new txNameTest(0, nsGkAtoms::_asterix, 0,
+                nodeTest = new txNameTest(0, nsGkAtoms::_asterisk, 0,
                                           nodeType);
                 break;
             }
         }
         NS_ENSURE_TRUE(nodeTest, NS_ERROR_OUT_OF_MEMORY);
 
         countPattern = new txStepPattern(nodeTest, false);
         if (!countPattern) {
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -973,17 +973,17 @@ XULDocument::AttributeChanged(nsIDocumen
             bool attrSet = aElement->GetAttr(kNameSpaceID_None, aAttribute, value);
 
             int32_t i;
             for (i = entry->mListeners.Count() - 1; i >= 0; --i) {
                 BroadcastListener* bl =
                     static_cast<BroadcastListener*>(entry->mListeners[i]);
 
                 if ((bl->mAttribute == aAttribute) ||
-                    (bl->mAttribute == nsGkAtoms::_asterix)) {
+                    (bl->mAttribute == nsGkAtoms::_asterisk)) {
                     nsCOMPtr<Element> listenerEl
                         = do_QueryReferent(bl->mListener);
                     if (listenerEl) {
                         nsAutoString currentValue;
                         bool hasAttr = listenerEl->GetAttr(kNameSpaceID_None,
                                                            aAttribute,
                                                            currentValue);
                         // We need to update listener only if we're
@@ -4163,17 +4163,17 @@ XULDocument::BroadcastAttributeChangeFro
 
     // We've got listeners: push the value.
     int32_t i;
     for (i = entry->mListeners.Count() - 1; i >= 0; --i) {
         BroadcastListener* bl = static_cast<BroadcastListener*>
             (entry->mListeners[i]);
 
         if ((bl->mAttribute != aAttribute) &&
-            (bl->mAttribute != nsGkAtoms::_asterix))
+            (bl->mAttribute != nsGkAtoms::_asterisk))
             continue;
 
         nsCOMPtr<nsIContent> l = do_QueryReferent(bl->mListener);
         if (l) {
             rv = l->SetAttr(aNameSpaceID, aAttribute,
                             aPrefix, aValue, false);
             if (NS_FAILED(rv)) return rv;
         }
--- a/layout/reftests/first-letter/399941-5-ref.html
+++ b/layout/reftests/first-letter/399941-5-ref.html
@@ -7,11 +7,11 @@
    span.fake-first-letter {
      color: lime;
      background-color: olive;
    }
   </style>
  </head>
  <body>
  <!-- If there is whitespace between the punctuation and the first letter, there is no first-letter -->
-  <p>"*" is an asterix</p>
+  <p>"*" is an asterisk</p>
  </body>
 </html>
--- a/layout/reftests/first-letter/399941-5.html
+++ b/layout/reftests/first-letter/399941-5.html
@@ -7,11 +7,11 @@
    p:first-letter {
      color: lime;
      background-color: olive;
    }
   </style>
  </head>
  <body>
  <!-- If there is whitespace between the punctuation and the first letter, there is no first-letter -->
-  <p>"*" is an asterix</p>
+  <p>"*" is an asterisk</p>
  </body>
 </html>