Chromium Code Reviews| Index: Source/core/dom/UserActionElementSet.h |
| diff --git a/Source/core/dom/UserActionElementSet.h b/Source/core/dom/UserActionElementSet.h |
| index 9883262c04fa6ed58faacf86d31e9a224ba2f11b..d3524aad15b81ce5028eff6f37889159571408aa 100644 |
| --- a/Source/core/dom/UserActionElementSet.h |
| +++ b/Source/core/dom/UserActionElementSet.h |
| @@ -27,6 +27,7 @@ |
| #ifndef UserActionElementSet_h |
| #define UserActionElementSet_h |
| +#include "platform/heap/Handle.h" |
| #include "wtf/HashMap.h" |
| #include "wtf/PassOwnPtr.h" |
| #include "wtf/RefPtr.h" |
| @@ -36,10 +37,9 @@ namespace WebCore { |
| class Node; |
| class Element; |
| -class UserActionElementSet { |
| +class UserActionElementSet FINAL { |
| + DISALLOW_ALLOCATION(); |
| public: |
| - static PassOwnPtr<UserActionElementSet> create() { return adoptPtr(new UserActionElementSet()); } |
| - |
| bool isFocused(const Node* node) { return hasFlags(node, IsFocusedFlag); } |
| bool isActive(const Node* node) { return hasFlags(node, IsActiveFlag); } |
| bool isInActiveChain(const Node* node) { return hasFlags(node, InActiveChainFlag); } |
| @@ -55,6 +55,8 @@ public: |
| void didDetach(Node*); |
| void documentDidRemoveLastRef(); |
|
haraken
2014/05/06 04:20:16
You can add #if !ENABLE(OILPAN) to this method.
Mads Ager (chromium)
2014/05/06 08:26:00
Done.
|
| + void trace(Visitor*); |
| + |
| private: |
| enum ElementFlags { |
| IsActiveFlag = 1 , |
| @@ -72,7 +74,7 @@ private: |
| void clearFlags(Element*, unsigned); |
| bool hasFlags(const Element*, unsigned flags) const; |
| - typedef HashMap<RefPtr<Element>, unsigned> ElementFlagMap; |
| + typedef WillBeHeapHashMap<RefPtrWillBeMember<Element>, unsigned> ElementFlagMap; |
| ElementFlagMap m_elements; |
| }; |