mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +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
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue