mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28: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
|
|
@ -19,7 +19,7 @@
|
|||
#include "nsIContent.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentEncoder.h"
|
||||
#include "nsIParserService.h"
|
||||
#include "nsElementTable.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "nsTextFragment.h"
|
||||
#include "nsString.h"
|
||||
|
|
@ -994,14 +994,9 @@ ElementNeedsSeparateEndTag(Element* aElement, Element* aOriginalElement)
|
|||
// HTML container tags should have a separate end tag even if empty, per spec.
|
||||
// See
|
||||
// https://w3c.github.io/DOM-Parsing/#dfn-concept-xml-serialization-algorithm
|
||||
bool isHTMLContainer = true; // Default in case we get no parser service.
|
||||
nsIParserService* parserService = nsContentUtils::GetParserService();
|
||||
if (parserService) {
|
||||
nsIAtom* localName = aElement->NodeInfo()->NameAtom();
|
||||
parserService->IsContainer(
|
||||
parserService->HTMLCaseSensitiveAtomTagToId(localName),
|
||||
isHTMLContainer);
|
||||
}
|
||||
nsIAtom* localName = aElement->NodeInfo()->NameAtom();
|
||||
bool isHTMLContainer =
|
||||
nsHTMLElement::IsContainer(nsHTMLTags::CaseSensitiveAtomTagToId(localName));
|
||||
return isHTMLContainer;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue