Bug 833009 - Remove "nsContentUtils.h" inclusions from headers in content/xslt/. r=Ms2ger
authorMounir Lamouri <mounir.lamouri@gmail.com>
Wed, 23 Jan 2013 19:40:52 +0000
changeset 120575 32831201b9efb07a8105f5091d21f7cf8e8dc37c
parent 120574 02e8dcde27b76ef8fc44fd94e23d81b71d1ef478
child 120576 7c676b4c0d53904e7fc8546b31486182e00dc2b9
push id24256
push userryanvm@gmail.com
push dateFri, 01 Feb 2013 20:50:01 +0000
treeherdermozilla-central@4e7c92906a79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs833009
milestone21.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 833009 - Remove "nsContentUtils.h" inclusions from headers in content/xslt/. r=Ms2ger
content/xslt/src/base/txStringUtils.h
content/xslt/src/xml/txXMLUtils.cpp
content/xslt/src/xml/txXMLUtils.h
content/xslt/src/xpath/txXPathNode.h
--- a/content/xslt/src/base/txStringUtils.h
+++ b/content/xslt/src/base/txStringUtils.h
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef txStringUtils_h__
 #define txStringUtils_h__
 
 #include "nsAString.h"
 #include "nsIAtom.h"
 #include "nsUnicharUtils.h"
-#include "nsContentUtils.h"
+#include "nsContentUtils.h" // For ASCIIToLower().
 
 typedef nsCaseInsensitiveStringComparator txCaseInsensitiveStringComparator;
 
 /**
  * Check equality between a string and an atom containing ASCII.
  */
 inline bool
 TX_StringEqualsAtom(const nsASingleFragmentString& aString, nsIAtom* aAtom)
--- a/content/xslt/src/xml/txXMLUtils.cpp
+++ b/content/xslt/src/xml/txXMLUtils.cpp
@@ -9,16 +9,17 @@
 
 #include "txXMLUtils.h"
 #include "nsString.h"
 #include "nsReadableUtils.h"
 #include "nsGkAtoms.h"
 #include "txStringUtils.h"
 #include "txNamespaceMap.h"
 #include "txXPathTreeWalker.h"
+#include "nsContentUtils.h"
 
 nsresult
 txExpandedName::init(const nsAString& aQName, txNamespaceMap* aResolver,
                      bool aUseDefault)
 {
     const nsAFlatString& qName = PromiseFlatString(aQName);
     const PRUnichar* colon;
     bool valid = XMLUtils::isValidQName(qName, &colon);
@@ -191,16 +192,23 @@ void XMLUtils::normalizePIValue(nsAStrin
         }
         piValue.Append(ch);
         prevCh = ch;
         ++conversionLoop;
     }
 }
 
 //static
+bool XMLUtils::isValidQName(const nsAFlatString& aQName,
+                            const PRUnichar** aColon)
+{
+  return NS_SUCCEEDED(nsContentUtils::CheckQName(aQName, true, aColon));
+}
+
+//static
 bool XMLUtils::getXMLSpacePreserve(const txXPathNode& aNode)
 {
     nsAutoString value;
     txXPathTreeWalker walker(aNode);
     do {
         if (walker.getAttr(nsGkAtoms::space, kNameSpaceID_XML, value)) {
             if (TX_StringEqualsAtom(value, nsGkAtoms::preserve)) {
                 return true;
--- a/content/xslt/src/xml/txXMLUtils.h
+++ b/content/xslt/src/xml/txXMLUtils.h
@@ -10,17 +10,16 @@
 #ifndef MITRE_XMLUTILS_H
 #define MITRE_XMLUTILS_H
 
 #include "txCore.h"
 #include "nsCOMPtr.h"
 #include "nsDependentSubstring.h"
 #include "nsIAtom.h"
 #include "txXPathNode.h"
-#include "nsContentUtils.h"
 
 #define kExpatSeparatorChar 0xFFFF
 
 extern "C" int MOZ_XMLIsLetter(const char* ptr);
 extern "C" int MOZ_XMLIsNCNameChar(const char* ptr);
 
 class nsIAtom;
 class txNamespaceMap;
@@ -109,20 +108,17 @@ public:
      * Normalizes the value of a XML processingInstruction
     **/
     static void normalizePIValue(nsAString& attValue);
 
     /**
      * Returns true if the given string is a valid XML QName
      */
     static bool isValidQName(const nsAFlatString& aQName,
-                               const PRUnichar** aColon)
-    {
-        return NS_SUCCEEDED(nsContentUtils::CheckQName(aQName, true, aColon));
-    }
+                             const PRUnichar** aColon);
 
     /**
      * Returns true if the given character represents an Alpha letter
      */
     static bool isLetter(PRUnichar aChar)
     {
         return !!MOZ_XMLIsLetter(reinterpret_cast<const char*>(&aChar));
     }   
--- a/content/xslt/src/xpath/txXPathNode.h
+++ b/content/xslt/src/xpath/txXPathNode.h
@@ -6,17 +6,17 @@
 #ifndef txXPathNode_h__
 #define txXPathNode_h__
 
 #include "nsAutoPtr.h"
 #include "nsIContent.h"
 #include "nsIDocument.h"
 #include "nsIDOMNode.h"
 #include "nsINameSpaceManager.h"
-#include "nsContentUtils.h"
+#include "nsContentUtils.h" // For NameSpaceManager().
 
 typedef nsIDOMNode txXPathNodeType;
 
 class txXPathNode
 {
 public:
     bool operator==(const txXPathNode& aNode) const;
     bool operator!=(const txXPathNode& aNode) const