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/nsXHTMLContentSerializer.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/nsXHTMLContentSerializer.cpp')
-rwxr-xr-x | dom/base/nsXHTMLContentSerializer.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/dom/base/nsXHTMLContentSerializer.cpp b/dom/base/nsXHTMLContentSerializer.cpp index 0a39ef663..aa330364b 100755 --- a/dom/base/nsXHTMLContentSerializer.cpp +++ b/dom/base/nsXHTMLContentSerializer.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" @@ -27,7 +28,6 @@ #include "nsEscape.h" #include "nsITextToSubURI.h" #include "nsCRT.h" -#include "nsIParserService.h" #include "nsContentUtils.h" #include "nsLWBrkCIID.h" #include "nsIScriptElement.h" @@ -667,18 +667,7 @@ nsXHTMLContentSerializer::LineBreakBeforeOpen(int32_t aNamespaceID, nsIAtom* aNa aName == nsGkAtoms::html) { return true; } - else { - nsIParserService* parserService = nsContentUtils::GetParserService(); - - if (parserService) { - bool res; - parserService-> - IsBlock(parserService->HTMLCaseSensitiveAtomTagToId(aName), res); - return res; - } - } - - return mAddSpace; + return nsHTMLElement::IsBlock(nsHTMLTags::CaseSensitiveAtomTagToId(aName)); } bool @@ -761,18 +750,7 @@ nsXHTMLContentSerializer::LineBreakAfterClose(int32_t aNamespaceID, nsIAtom* aNa (aName == nsGkAtoms::div)) { return true; } - else { - nsIParserService* parserService = nsContentUtils::GetParserService(); - - if (parserService) { - bool res; - parserService-> - IsBlock(parserService->HTMLCaseSensitiveAtomTagToId(aName), res); - return res; - } - } - - return false; + return nsHTMLElement::IsBlock(nsHTMLTags::CaseSensitiveAtomTagToId(aName)); } |