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/CustomElementRegistry.h | |
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/CustomElementRegistry.h')
-rw-r--r-- | dom/base/CustomElementRegistry.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h index d3dfef682..81d1c003c 100644 --- a/dom/base/CustomElementRegistry.h +++ b/dom/base/CustomElementRegistry.h @@ -112,9 +112,7 @@ struct CustomElementData explicit CustomElementData(nsIAtom* aType); CustomElementData(nsIAtom* aType, State aState); - // Custom element type, for <button is="x-button"> or <x-button> - // this would be x-button. - nsCOMPtr<nsIAtom> mType; + // Element is being created flag as described in the custom elements spec. bool mElementIsBeingCreated; // Flag to determine if the created callback has been invoked, thus it @@ -132,6 +130,7 @@ struct CustomElementData void SetCustomElementDefinition(CustomElementDefinition* aDefinition); CustomElementDefinition* GetCustomElementDefinition(); + nsIAtom* GetCustomElementType(); void Traverse(nsCycleCollectionTraversalCallback& aCb) const; void Unlink(); @@ -139,6 +138,9 @@ struct CustomElementData private: virtual ~CustomElementData() {} + // Custom element type, for <button is="x-button"> or <x-button> + // this would be x-button. + RefPtr<nsIAtom> mType; RefPtr<CustomElementDefinition> mCustomElementDefinition; }; @@ -361,18 +363,11 @@ public: * https://html.spec.whatwg.org/#look-up-a-custom-element-definition */ CustomElementDefinition* LookupCustomElementDefinition( - const nsAString& aLocalName, const nsAString* aIs = nullptr) const; + const nsAString& aLocalName, nsIAtom* aTypeAtom) const; CustomElementDefinition* LookupCustomElementDefinition( JSContext* aCx, JSObject *aConstructor) const; - /** - * Enqueue created callback or register upgrade candidate for - * newly created custom elements, possibly extending an existing type. - * ex. <x-button>, <button is="x-button> (type extension) - */ - void SetupCustomElement(Element* aElement, const nsAString* aTypeExtension); - static void EnqueueLifecycleCallback(nsIDocument::ElementCallbackType aType, Element* aCustomElement, LifecycleCallbackArgs* aArgs, |