OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CustomElementReactionStack_h |
| 6 #define CustomElementReactionStack_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/Noncopyable.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class CustomElementReaction; |
| 15 class CustomElementReactionQueue; |
| 16 class Element; |
| 17 |
| 18 // https://html.spec.whatwg.org/multipage/scripting.html#custom-element-reaction
s |
| 19 class CORE_EXPORT CustomElementReactionStack final |
| 20 : public GarbageCollectedFinalized<CustomElementReactionStack> { |
| 21 WTF_MAKE_NONCOPYABLE(CustomElementReactionStack); |
| 22 public: |
| 23 CustomElementReactionStack(); |
| 24 ~CustomElementReactionStack(); |
| 25 |
| 26 DECLARE_TRACE(); |
| 27 |
| 28 void push(); |
| 29 void popInvokingReactions(); |
| 30 void enqueue(Element*, CustomElementReaction*); |
| 31 |
| 32 private: |
| 33 using ElementReactionQueueMap = |
| 34 HeapHashMap<Member<Element>, Member<CustomElementReactionQueue>>; |
| 35 ElementReactionQueueMap m_map; |
| 36 |
| 37 using ElementQueue = HeapVector<Member<Element>, 1>; |
| 38 HeapVector<Member<ElementQueue>> m_stack; |
| 39 }; |
| 40 |
| 41 } // namespace blink |
| 42 |
| 43 #endif // CustomElementReactionStack_h |
OLD | NEW |