diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-04 13:24:58 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-26 15:50:16 -0500 |
commit | e86aac28b8f450cc99836b07a5c0ffddb59f222f (patch) | |
tree | eda5daf511829e83980e624d569e11fba2497d7d /dom/base/CustomElementRegistry.h | |
parent | 88925e150bbcb64d1787b374c2115e6e28c3f6df (diff) | |
download | UXP-e86aac28b8f450cc99836b07a5c0ffddb59f222f.tar UXP-e86aac28b8f450cc99836b07a5c0ffddb59f222f.tar.gz UXP-e86aac28b8f450cc99836b07a5c0ffddb59f222f.tar.lz UXP-e86aac28b8f450cc99836b07a5c0ffddb59f222f.tar.xz UXP-e86aac28b8f450cc99836b07a5c0ffddb59f222f.zip |
Bug 1359346 - Implement custom element state;
https://dom.spec.whatwg.org/#concept-element-custom-element-state
Tag UXP Issue #1344
Diffstat (limited to 'dom/base/CustomElementRegistry.h')
-rw-r--r-- | dom/base/CustomElementRegistry.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h index 24d501d73..6184c0ac3 100644 --- a/dom/base/CustomElementRegistry.h +++ b/dom/base/CustomElementRegistry.h @@ -71,7 +71,18 @@ struct CustomElementData { NS_INLINE_DECL_REFCOUNTING(CustomElementData) + // https://dom.spec.whatwg.org/#concept-element-custom-element-state + // CustomElementData is only created on the element which is a custom element + // or an upgrade candidate, so the state of an element without + // CustomElementData is "uncustomized". + enum class State { + eUndefined, + eFailed, + eCustom + }; + explicit CustomElementData(nsIAtom* aType); + CustomElementData(nsIAtom* aType, State aState); // Objects in this array are transient and empty after each microtask // checkpoint. nsTArray<nsAutoPtr<CustomElementCallback>> mCallbackQueue; @@ -89,6 +100,8 @@ struct CustomElementData // it is used to determine if a new queue needs to be pushed onto the // processing stack. int32_t mAssociatedMicroTask; + // Custom element state as described in the custom element spec. + State mState; // Empties the callback queue. void RunCallbackQueue(); |