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

Unified Diff: Source/core/page/EventHandler.h

Issue 68303004: [oilpan] Move EventHandler to the heap (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « Source/core/page/AutoscrollController.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.h
diff --git a/Source/core/page/EventHandler.h b/Source/core/page/EventHandler.h
index 2bc1521d570aeb9d6335a91e0df24c334f5619cc..f186df688afbe20b87060d17bff5664ff7922f2d 100644
--- a/Source/core/page/EventHandler.h
+++ b/Source/core/page/EventHandler.h
@@ -87,10 +87,16 @@ extern const int GeneralDragHysteresis;
enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTrailingWhitespace };
enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis };
-class EventHandler {
- WTF_MAKE_NONCOPYABLE(EventHandler);
+class EventHandler : public HeapAllocatedFinalized<EventHandler> {
+ DECLARE_GC_MAP
+ DEFINE_SELF_HANDLE(EventHandler)
+ WTF_MAKE_NONCOPYABLE(EventHandler)
public:
- explicit EventHandler(Frame*);
+ static RESULT(EventHandler) create(Frame* frame)
+ {
+ return adopt(new EventHandler(frame));
+ }
+
~EventHandler();
void clear();
@@ -208,7 +214,11 @@ public:
bool useHandCursor(HANDLE_FORMAL(Node), bool isOverLink, bool shiftKey);
+ void accept(Visitor*) const;
+
private:
+ explicit EventHandler(Frame*);
+
static DragState& dragState();
static const double TextDragDelay;
@@ -318,7 +328,7 @@ private:
bool m_mousePressed;
bool m_capturesDragging;
- ANNOTATED_FIELD(Persistent<Node>, m_mousePressNode);
+ Member<Node> m_mousePressNode;
bool m_mouseDownMayStartSelect;
bool m_mouseDownMayStartDrag;
@@ -347,22 +357,22 @@ private:
RenderLayer* m_resizeLayer;
- ANNOTATED_FIELD(Persistent<Node>, m_capturingMouseEventsNode);
+ Member<Node> m_capturingMouseEventsNode;
bool m_eventHandlerWillResetCapturingMouseEventsNode;
- ANNOTATED_FIELD(Persistent<Node>, m_nodeUnderMouse);
- ANNOTATED_FIELD(Persistent<Node>, m_lastNodeUnderMouse);
+ Member<Node> m_nodeUnderMouse;
+ Member<Node> m_lastNodeUnderMouse;
RefPtr<Frame> m_lastMouseMoveEventSubframe;
RefPtr<Scrollbar> m_lastScrollbarUnderMouse;
Cursor m_currentMouseCursor;
int m_clickCount;
- ANNOTATED_FIELD(Persistent<Node>, m_clickNode);
+ Member<Node> m_clickNode;
- ANNOTATED_FIELD(Persistent<Node>, m_dragTarget);
+ Member<Node> m_dragTarget;
bool m_shouldOnlyFireDragOverEvent;
- ANNOTATED_FIELD(Persistent<HTMLFrameSetElement>, m_frameSetBeingResized);
+ Member<HTMLFrameSetElement> m_frameSetBeingResized;
LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeLayer.
@@ -374,20 +384,20 @@ private:
PlatformMouseEvent m_mouseDown;
RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken;
- ANNOTATED_FIELD(Persistent<Node>, m_latchedWheelEventNode);
+ Member<Node> m_latchedWheelEventNode;
bool m_widgetIsLatched;
- ANNOTATED_FIELD(Persistent<Node>, m_previousWheelScrolledNode);
+ Member<Node> m_previousWheelScrolledNode;
typedef CollectionRoot<HashMap<int, Member<EventTarget> > > TouchTargetMap;
haraken 2013/11/11 12:41:35 oh, I forgot to remove this CollectionRoot. Just a
haraken 2013/11/11 12:45:29 Done.
ANNOTATED_FIELD(TouchTargetMap, m_originatingTouchPointTargets);
- ANNOTATED_FIELD(Persistent<Document>, m_originatingTouchPointDocument);
+ Member<Document> m_originatingTouchPointDocument;
unsigned m_originatingTouchPointTargetKey;
bool m_touchPressed;
- ANNOTATED_FIELD(Persistent<Node>, m_scrollGestureHandlingNode);
+ Member<Node> m_scrollGestureHandlingNode;
bool m_lastHitTestResultOverWidget;
- ANNOTATED_FIELD(Persistent<Node>, m_previousGestureScrolledNode);
+ Member<Node> m_previousGestureScrolledNode;
RefPtr<Scrollbar> m_scrollbarHandlingScrollGesture;
double m_maxMouseMovedDuration;
« no previous file with comments | « Source/core/page/AutoscrollController.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698