diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-19 22:59:16 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-26 15:50:46 -0500 |
commit | fb657f7a1e3ef326214e0c42a5a0dd6dc0109338 (patch) | |
tree | 5b928a47adc3834d4248e82898ae30e2fe0df43c /dom/base/nsContentUtils.cpp | |
parent | 72d4c0b8df4a0080ee10ba302dd4fafeacd0f560 (diff) | |
download | UXP-fb657f7a1e3ef326214e0c42a5a0dd6dc0109338.tar UXP-fb657f7a1e3ef326214e0c42a5a0dd6dc0109338.tar.gz UXP-fb657f7a1e3ef326214e0c42a5a0dd6dc0109338.tar.lz UXP-fb657f7a1e3ef326214e0c42a5a0dd6dc0109338.tar.xz UXP-fb657f7a1e3ef326214e0c42a5a0dd6dc0109338.zip |
Bug 1406325 - Part 4: Use mType for LookupCustomElementDefinition and also removing parts of v0.
Tag UXP Issue #1344
Diffstat (limited to 'dom/base/nsContentUtils.cpp')
-rw-r--r-- | dom/base/nsContentUtils.cpp | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 864319b17..8c157a8ee 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -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* |