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/base/nsHTMLContentSerializer.cpp | |
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/base/nsHTMLContentSerializer.cpp')
-rw-r--r-- | dom/base/nsHTMLContentSerializer.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/dom/base/nsHTMLContentSerializer.cpp b/dom/base/nsHTMLContentSerializer.cpp index c135c4cf8..ea9c5a66f 100644 --- a/dom/base/nsHTMLContentSerializer.cpp +++ b/dom/base/nsHTMLContentSerializer.cpp @@ -15,6 +15,7 @@ #include "nsIDOMElement.h" #include "nsIContent.h" #include "nsIDocument.h" +#include "nsElementTable.h" #include "nsNameSpaceManager.h" #include "nsString.h" #include "nsUnicharUtils.h" @@ -347,20 +348,13 @@ nsHTMLContentSerializer::AppendElementEnd(Element* aElement, } if (ns == kNameSpaceID_XHTML) { - nsIParserService* parserService = nsContentUtils::GetParserService(); - - if (parserService) { - bool isContainer; - - parserService-> - IsContainer(parserService->HTMLCaseSensitiveAtomTagToId(name), - isContainer); - if (!isContainer) { - // Keep this in sync with the cleanup at the end of this method. - MOZ_ASSERT(name != nsGkAtoms::body); - MaybeLeaveFromPreContent(content); - return NS_OK; - } + bool isContainer = + nsHTMLElement::IsContainer(nsHTMLTags::CaseSensitiveAtomTagToId(name)); + if (!isContainer) { + // Keep this in sync with the cleanup at the end of this method. + MOZ_ASSERT(name != nsGkAtoms::body); + MaybeLeaveFromPreContent(content); + return NS_OK; } } |