Bug 729048 - Part 5: Remove nsParserService::CheckQName. r=hsivonen
authorMatias Juntunen <matias.juntunen@gmail.com>
Thu, 29 Mar 2012 17:31:41 -0400
changeset 93976 4bbfb954c0dd9737ee0bf01646ef686ea5d6ec33
parent 93975 db2978f38798c96f35b169a14564d455da948d7b
child 93977 2c149ce94c490efeadb3fe0567535404ced4a299
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs729048
milestone14.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 729048 - Part 5: Remove nsParserService::CheckQName. r=hsivonen
parser/htmlparser/public/nsIParserService.h
parser/htmlparser/src/nsParserService.cpp
parser/htmlparser/src/nsParserService.h
--- a/parser/htmlparser/public/nsIParserService.h
+++ b/parser/htmlparser/public/nsIParserService.h
@@ -120,17 +120,13 @@ class nsIParserService : public nsISuppo
   NS_IMETHOD HTMLConvertEntityToUnicode(const nsAString& aEntity, 
                                         PRInt32* aUnicode) const = 0;
 
   NS_IMETHOD HTMLConvertUnicodeToEntity(PRInt32 aUnicode,
                                         nsCString& aEntity) const = 0;
 
   NS_IMETHOD IsContainer(PRInt32 aId, bool& aIsContainer) const = 0;
   NS_IMETHOD IsBlock(PRInt32 aId, bool& aIsBlock) const = 0;
-
-  virtual nsresult CheckQName(const nsAString& aQName,
-                              bool aNamespaceAware,
-                              const PRUnichar** aColon) = 0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIParserService, NS_IPARSERSERVICE_IID)
 
 #endif // nsIParserService_h__
--- a/parser/htmlparser/src/nsParserService.cpp
+++ b/parser/htmlparser/src/nsParserService.cpp
@@ -39,19 +39,16 @@
 #include "nsDOMError.h"
 #include "nsIAtom.h"
 #include "nsParserService.h"
 #include "nsHTMLEntities.h"
 #include "nsElementTable.h"
 #include "nsICategoryManager.h"
 #include "nsCategoryManagerUtils.h"
 
-extern "C" int MOZ_XMLCheckQName(const char* ptr, const char* end,
-                                 int ns_aware, const char** colon);
-
 nsParserService::nsParserService()
 {
 }
 
 nsParserService::~nsParserService()
 {
 }
 
@@ -127,34 +124,8 @@ nsParserService::IsBlock(PRInt32 aId, bo
               (gHTMLElements[aId].IsMemberOf(kList)));
   }
   else {
     aIsBlock = false;
   }
 
   return NS_OK;
 }
-
-nsresult
-nsParserService::CheckQName(const nsAString& aQName,
-                            bool aNamespaceAware,
-                            const PRUnichar** aColon)
-{
-  const char* colon;
-  const PRUnichar *begin, *end;
-  begin = aQName.BeginReading();
-  end = aQName.EndReading();
-  int result = MOZ_XMLCheckQName(reinterpret_cast<const char*>(begin),
-                                 reinterpret_cast<const char*>(end),
-                                 aNamespaceAware, &colon);
-  *aColon = reinterpret_cast<const PRUnichar*>(colon);
-
-  if (result == 0) {
-    return NS_OK;
-  }
-
-  // MOZ_EXPAT_EMPTY_QNAME || MOZ_EXPAT_INVALID_CHARACTER
-  if (result == (1 << 0) || result == (1 << 1)) {
-    return NS_ERROR_DOM_INVALID_CHARACTER_ERR;
-  }
-
-  return NS_ERROR_DOM_NAMESPACE_ERR;
-}
--- a/parser/htmlparser/src/nsParserService.h
+++ b/parser/htmlparser/src/nsParserService.h
@@ -64,14 +64,11 @@ public:
   nsIAtom *HTMLIdToAtomTag(PRInt32 aId) const;
 
   NS_IMETHOD HTMLConvertEntityToUnicode(const nsAString& aEntity, 
                                         PRInt32* aUnicode) const;
   NS_IMETHOD HTMLConvertUnicodeToEntity(PRInt32 aUnicode,
                                         nsCString& aEntity) const;
   NS_IMETHOD IsContainer(PRInt32 aId, bool& aIsContainer) const;
   NS_IMETHOD IsBlock(PRInt32 aId, bool& aIsBlock) const;
-
-  nsresult CheckQName(const nsAString& aQName,
-                      bool aNamespaceAware, const PRUnichar** aColon);
 };
 
 #endif