mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-29 10:48:39 +09:00
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
This commit is contained in:
parent
cc649173d2
commit
9928baf912
18 changed files with 77 additions and 193 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue