mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-01 03:57:30 +09:00
Bug 1359346 - Implement custom element state;
https://dom.spec.whatwg.org/#concept-element-custom-element-state Tag UXP Issue #1344
This commit is contained in:
parent
5ad5f4e1ec
commit
cb89330bf3
3 changed files with 44 additions and 22 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue