diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:24:43 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:24:43 -0400 |
commit | 61e46a6d58a58e249f1982d903780bf5bccb8f6b (patch) | |
tree | fd3de5eca4f0bdce70df9f0a9a51549dae4942d9 /dom/html | |
parent | 8114d58fee29120ab4a7af7bd9b5c77252ab1d86 (diff) | |
download | UXP-61e46a6d58a58e249f1982d903780bf5bccb8f6b.tar UXP-61e46a6d58a58e249f1982d903780bf5bccb8f6b.tar.gz UXP-61e46a6d58a58e249f1982d903780bf5bccb8f6b.tar.lz UXP-61e46a6d58a58e249f1982d903780bf5bccb8f6b.tar.xz UXP-61e46a6d58a58e249f1982d903780bf5bccb8f6b.zip |
Issue #1375 - Stop largely using the parser service
This is based on Bug 1395828
* Add nsHTMLElement::IsBlock()
* Rename nsHTMLTags methods
* Remove AssertParserServiceIsCorrect()
* Remove most uses of nsIParserService/nsParserService
Diffstat (limited to 'dom/html')
-rw-r--r-- | dom/html/nsHTMLContentSink.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/dom/html/nsHTMLContentSink.cpp b/dom/html/nsHTMLContentSink.cpp index 1fe5d2a86..1c390a53e 100644 --- a/dom/html/nsHTMLContentSink.cpp +++ b/dom/html/nsHTMLContentSink.cpp @@ -14,6 +14,7 @@ #include "nsContentSink.h" #include "nsCOMPtr.h" +#include "nsHTMLTags.h" #include "nsReadableUtils.h" #include "nsUnicharUtils.h" #include "nsIHTMLContentSink.h" @@ -59,8 +60,6 @@ #include "nsIScriptGlobalObject.h" #include "nsNameSpaceManager.h" -#include "nsIParserService.h" - #include "nsIStyleSheetLinkingElement.h" #include "nsITimer.h" #include "nsError.h" @@ -262,10 +261,6 @@ NS_NewHTMLElement(Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& RefPtr<mozilla::dom::NodeInfo> nodeInfo = aNodeInfo; - nsIParserService* parserService = nsContentUtils::GetParserService(); - if (!parserService) - return NS_ERROR_OUT_OF_MEMORY; - nsIAtom *name = nodeInfo->NameAtom(); RefPtr<nsIAtom> tagAtom = nodeInfo->NameAtom(); RefPtr<nsIAtom> typeAtom = aIs ? NS_Atomize(*aIs) : tagAtom; @@ -273,7 +268,7 @@ NS_NewHTMLElement(Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& NS_ASSERTION(nodeInfo->NamespaceEquals(kNameSpaceID_XHTML), "Trying to HTML elements that don't have the XHTML namespace"); - int32_t tag = parserService->HTMLCaseSensitiveAtomTagToId(name); + int32_t tag = nsHTMLTags::CaseSensitiveAtomTagToId(name); bool isCustomElementName = (tag == eHTMLTag_userdefined && nsContentUtils::IsCustomElementName(name)); |