Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(839)

Unified Diff: Source/core/dom/UserActionElementSet.h

Issue 262093006: Oilpan: Make the Node hierarchy RefCountedGarbageCollected instead of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor cleanup. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/UserActionElementSet.h
diff --git a/Source/core/dom/UserActionElementSet.h b/Source/core/dom/UserActionElementSet.h
index 9883262c04fa6ed58faacf86d31e9a224ba2f11b..e150b972c92d1e011cfb5a1781e01030cee75e9e 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"
@@ -37,9 +38,8 @@ class Node;
class Element;
class UserActionElementSet {
zerny-chromium 2014/05/05 11:07:52 Nit: FINAL (since we use a non-virtual trace)
Mads Ager (chromium) 2014/05/05 11:35:54 Done.
+ 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();
+ 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;
};

Powered by Google App Engine
This is Rietveld 408576698