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

Side by Side Diff: sky/engine/core/page/EventHandler.h

Issue 868933003: Remove user gesture tracking (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 #define SKY_ENGINE_CORE_PAGE_EVENTHANDLER_H_ 27 #define SKY_ENGINE_CORE_PAGE_EVENTHANDLER_H_
28 28
29 #include "sky/engine/core/editing/TextGranularity.h" 29 #include "sky/engine/core/editing/TextGranularity.h"
30 #include "sky/engine/core/events/TextEventInputType.h" 30 #include "sky/engine/core/events/TextEventInputType.h"
31 #include "sky/engine/core/page/FocusType.h" 31 #include "sky/engine/core/page/FocusType.h"
32 #include "sky/engine/core/rendering/HitTestRequest.h" 32 #include "sky/engine/core/rendering/HitTestRequest.h"
33 #include "sky/engine/core/rendering/style/RenderStyleConstants.h" 33 #include "sky/engine/core/rendering/style/RenderStyleConstants.h"
34 #include "sky/engine/platform/Cursor.h" 34 #include "sky/engine/platform/Cursor.h"
35 #include "sky/engine/platform/PlatformMouseEvent.h" 35 #include "sky/engine/platform/PlatformMouseEvent.h"
36 #include "sky/engine/platform/Timer.h" 36 #include "sky/engine/platform/Timer.h"
37 #include "sky/engine/platform/UserGestureIndicator.h"
38 #include "sky/engine/platform/geometry/LayoutPoint.h" 37 #include "sky/engine/platform/geometry/LayoutPoint.h"
39 #include "sky/engine/platform/heap/Handle.h" 38 #include "sky/engine/platform/heap/Handle.h"
40 #include "sky/engine/platform/scroll/ScrollTypes.h" 39 #include "sky/engine/platform/scroll/ScrollTypes.h"
41 #include "sky/engine/wtf/Forward.h" 40 #include "sky/engine/wtf/Forward.h"
42 #include "sky/engine/wtf/HashMap.h" 41 #include "sky/engine/wtf/HashMap.h"
43 #include "sky/engine/wtf/HashTraits.h" 42 #include "sky/engine/wtf/HashTraits.h"
44 #include "sky/engine/wtf/RefPtr.h" 43 #include "sky/engine/wtf/RefPtr.h"
45 44
46 namespace blink { 45 namespace blink {
47 46
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void focusDocumentView(); 154 void focusDocumentView();
156 155
157 void capsLockStateMayHaveChanged(); // Only called by FrameSelection 156 void capsLockStateMayHaveChanged(); // Only called by FrameSelection
158 157
159 bool handleTouchEvent(const PlatformTouchEvent&); 158 bool handleTouchEvent(const PlatformTouchEvent&);
160 159
161 bool useHandCursor(Node*, bool isOverLink); 160 bool useHandCursor(Node*, bool isOverLink);
162 161
163 void notifyElementActivated(); 162 void notifyElementActivated();
164 163
165 PassRefPtr<UserGestureToken> takeLastMouseDownGestureToken() { return m_last MouseDownUserGestureToken.release(); }
166
167 private: 164 private:
168 bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleS election&, TextGranularity); 165 bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleS election&, TextGranularity);
169 void selectClosestWordFromHitTestResult(const HitTestResult&, AppendTrailing Whitespace); 166 void selectClosestWordFromHitTestResult(const HitTestResult&, AppendTrailing Whitespace);
170 void selectClosestMisspellingFromHitTestResult(const HitTestResult&, AppendT railingWhitespace); 167 void selectClosestMisspellingFromHitTestResult(const HitTestResult&, AppendT railingWhitespace);
171 void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&); 168 void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&);
172 void selectClosestMisspellingFromMouseEvent(const MouseEventWithHitTestResul ts&); 169 void selectClosestMisspellingFromMouseEvent(const MouseEventWithHitTestResul ts&);
173 void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResult s&); 170 void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResult s&);
174 171
175 bool handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, HitTestResult* h overedNode = 0, bool onlyUpdateScrollbars = false); 172 bool handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, HitTestResult* h overedNode = 0, bool onlyUpdateScrollbars = false);
176 bool handleMousePressEvent(const MouseEventWithHitTestResults&); 173 bool handleMousePressEvent(const MouseEventWithHitTestResults&);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 291
295 RefPtr<Node> m_dragTarget; 292 RefPtr<Node> m_dragTarget;
296 bool m_shouldOnlyFireDragOverEvent; 293 bool m_shouldOnlyFireDragOverEvent;
297 294
298 bool m_mousePositionIsUnknown; 295 bool m_mousePositionIsUnknown;
299 IntPoint m_lastKnownMousePosition; 296 IntPoint m_lastKnownMousePosition;
300 IntPoint m_lastKnownMouseGlobalPosition; 297 IntPoint m_lastKnownMouseGlobalPosition;
301 IntPoint m_mouseDownPos; // In our view's coords. 298 IntPoint m_mouseDownPos; // In our view's coords.
302 double m_mouseDownTimestamp; 299 double m_mouseDownTimestamp;
303 PlatformMouseEvent m_mouseDown; 300 PlatformMouseEvent m_mouseDown;
304 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken;
305 301
306 RefPtr<Node> m_latchedWheelEventNode; 302 RefPtr<Node> m_latchedWheelEventNode;
307 bool m_widgetIsLatched; 303 bool m_widgetIsLatched;
308 304
309 RefPtr<Node> m_previousWheelScrolledNode; 305 RefPtr<Node> m_previousWheelScrolledNode;
310 306
311 // The target of each active touch point indexed by the touch ID. 307 // The target of each active touch point indexed by the touch ID.
312 typedef HashMap<unsigned, RefPtr<EventTarget>, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned> > TouchTargetMap; 308 typedef HashMap<unsigned, RefPtr<EventTarget>, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned> > TouchTargetMap;
313 TouchTargetMap m_targetForTouchID; 309 TouchTargetMap m_targetForTouchID;
314 310
315 // If set, the document of the active touch sequence. Unset if no touch sequ ence active. 311 // If set, the document of the active touch sequence. Unset if no touch sequ ence active.
316 RefPtr<Document> m_touchSequenceDocument; 312 RefPtr<Document> m_touchSequenceDocument;
317 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken;
318 313
319 bool m_touchPressed; 314 bool m_touchPressed;
320 315
321 RefPtr<Node> m_scrollGestureHandlingNode; 316 RefPtr<Node> m_scrollGestureHandlingNode;
322 bool m_lastGestureScrollOverWidget; 317 bool m_lastGestureScrollOverWidget;
323 RefPtr<Node> m_previousGestureScrolledNode; 318 RefPtr<Node> m_previousGestureScrolledNode;
324 RefPtr<Scrollbar> m_scrollbarHandlingScrollGesture; 319 RefPtr<Scrollbar> m_scrollbarHandlingScrollGesture;
325 320
326 double m_maxMouseMovedDuration; 321 double m_maxMouseMovedDuration;
327 bool m_didStartDrag; 322 bool m_didStartDrag;
328 323
329 Timer<EventHandler> m_activeIntervalTimer; 324 Timer<EventHandler> m_activeIntervalTimer;
330 double m_lastShowPressTimestamp; 325 double m_lastShowPressTimestamp;
331 RefPtr<Element> m_lastDeferredTapElement; 326 RefPtr<Element> m_lastDeferredTapElement;
332 }; 327 };
333 328
334 } // namespace blink 329 } // namespace blink
335 330
336 #endif // SKY_ENGINE_CORE_PAGE_EVENTHANDLER_H_ 331 #endif // SKY_ENGINE_CORE_PAGE_EVENTHANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698