mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Bug 1406325 - Part 4: Use mType for LookupCustomElementDefinition and also removing parts of v0.
Tag UXP Issue #1344
This commit is contained in:
parent
c4718c47bb
commit
db3b6b5884
8 changed files with 34 additions and 112 deletions
|
|
@ -9579,7 +9579,7 @@ nsContentUtils::HttpsStateIsModern(nsIDocument* aDocument)
|
|||
nsContentUtils::LookupCustomElementDefinition(nsIDocument* aDoc,
|
||||
const nsAString& aLocalName,
|
||||
uint32_t aNameSpaceID,
|
||||
const nsAString* aIs)
|
||||
nsIAtom* aTypeAtom)
|
||||
{
|
||||
MOZ_ASSERT(aDoc);
|
||||
|
||||
|
|
@ -9601,40 +9601,7 @@ nsContentUtils::LookupCustomElementDefinition(nsIDocument* aDoc,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
return registry->LookupCustomElementDefinition(aLocalName, aIs);
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
nsContentUtils::SetupCustomElement(Element* aElement,
|
||||
const nsAString* aTypeExtension)
|
||||
{
|
||||
MOZ_ASSERT(aElement);
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = aElement->OwnerDoc();
|
||||
|
||||
if (!doc) {
|
||||
return;
|
||||
}
|
||||
|
||||
// To support imported document.
|
||||
doc = doc->MasterDocument();
|
||||
|
||||
if (aElement->GetNameSpaceID() != kNameSpaceID_XHTML ||
|
||||
!doc->GetDocShell()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowInner> window(doc->GetInnerWindow());
|
||||
if (!window) {
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<CustomElementRegistry> registry(window->CustomElements());
|
||||
if (!registry) {
|
||||
return;
|
||||
}
|
||||
|
||||
return registry->SetupCustomElement(aElement, aTypeExtension);
|
||||
return registry->LookupCustomElementDefinition(aLocalName, aTypeAtom);
|
||||
}
|
||||
|
||||
/* static */ CustomElementDefinition*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue