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

Side by Side Diff: Source/core/page/EventHandler.h

Issue 509173004: Revert of Reduce hit test on ShowPress by moving event targeting to WebViewImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/events/hit-test-counts-expected.txt ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef EventHandler_h 26 #ifndef EventHandler_h
27 #define EventHandler_h 27 #define EventHandler_h
28 28
29 #include "core/editing/TextGranularity.h" 29 #include "core/editing/TextGranularity.h"
30 #include "core/events/TextEventInputType.h" 30 #include "core/events/TextEventInputType.h"
31 #include "core/page/DragActions.h" 31 #include "core/page/DragActions.h"
32 #include "core/page/EventWithHitTestResults.h"
33 #include "core/page/FocusType.h" 32 #include "core/page/FocusType.h"
34 #include "core/rendering/HitTestRequest.h" 33 #include "core/rendering/HitTestRequest.h"
35 #include "core/rendering/style/RenderStyleConstants.h" 34 #include "core/rendering/style/RenderStyleConstants.h"
36 #include "platform/Cursor.h" 35 #include "platform/Cursor.h"
37 #include "platform/PlatformMouseEvent.h" 36 #include "platform/PlatformMouseEvent.h"
38 #include "platform/Timer.h" 37 #include "platform/Timer.h"
39 #include "platform/UserGestureIndicator.h" 38 #include "platform/UserGestureIndicator.h"
40 #include "platform/geometry/LayoutPoint.h" 39 #include "platform/geometry/LayoutPoint.h"
41 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
42 #include "platform/scroll/ScrollTypes.h" 41 #include "platform/scroll/ScrollTypes.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 class RenderObject; 74 class RenderObject;
76 class RenderWidget; 75 class RenderWidget;
77 class ScrollableArea; 76 class ScrollableArea;
78 class Scrollbar; 77 class Scrollbar;
79 class TextEvent; 78 class TextEvent;
80 class TouchEvent; 79 class TouchEvent;
81 class VisibleSelection; 80 class VisibleSelection;
82 class WheelEvent; 81 class WheelEvent;
83 class Widget; 82 class Widget;
84 83
84 typedef EventWithHitTestResults<PlatformGestureEvent> GestureEventWithHitTestRes ults;
85 typedef EventWithHitTestResults<PlatformMouseEvent> MouseEventWithHitTestResults ;
86
85 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili ngWhitespace }; 87 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili ngWhitespace };
86 enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis }; 88 enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis };
87 89
88 class EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler> { 90 class EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler> {
89 WTF_MAKE_NONCOPYABLE(EventHandler); 91 WTF_MAKE_NONCOPYABLE(EventHandler);
90 public: 92 public:
91 explicit EventHandler(LocalFrame*); 93 explicit EventHandler(LocalFrame*);
92 ~EventHandler(); 94 ~EventHandler();
93 void trace(Visitor*); 95 void trace(Visitor*);
94 96
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 bool handleMouseMoveEvent(const PlatformMouseEvent&); 141 bool handleMouseMoveEvent(const PlatformMouseEvent&);
140 void handleMouseLeaveEvent(const PlatformMouseEvent&); 142 void handleMouseLeaveEvent(const PlatformMouseEvent&);
141 143
142 bool handleMousePressEvent(const PlatformMouseEvent&); 144 bool handleMousePressEvent(const PlatformMouseEvent&);
143 bool handleMouseReleaseEvent(const PlatformMouseEvent&); 145 bool handleMouseReleaseEvent(const PlatformMouseEvent&);
144 bool handleWheelEvent(const PlatformWheelEvent&); 146 bool handleWheelEvent(const PlatformWheelEvent&);
145 void defaultWheelEventHandler(Node*, WheelEvent*); 147 void defaultWheelEventHandler(Node*, WheelEvent*);
146 148
147 // Called on the local root frame exactly once per gesture event. 149 // Called on the local root frame exactly once per gesture event.
148 bool handleGestureEvent(const PlatformGestureEvent&); 150 bool handleGestureEvent(const PlatformGestureEvent&);
149 bool handleGestureEvent(const GestureEventWithHitTestResults&);
150 151
151 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme nt and updating 152 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme nt and updating
152 // hover/active state across all frames if necessary. This should be called at most once 153 // hover/active state across all frames if necessary. This should be called at most once
153 // per gesture event, and called on the local root frame. 154 // per gesture event, and called on the local root frame.
154 // Note: This is similar to (the less clearly named) prepareMouseEvent. 155 // Note: This is similar to (the less clearly named) prepareMouseEvent.
155 // FIXME: Remove readOnly param when there is only ever a single call to thi s. 156 // FIXME: Remove readOnly param when there is only ever a single call to thi s.
156 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent &, bool readOnly = false); 157 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent &, bool readOnly = false);
157 158
158 // Handle the provided non-scroll gesture event. Should be called only on th e inner frame. 159 // Handle the provided non-scroll gesture event. Should be called only on th e inner frame.
159 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&); 160 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 bool m_longTapShouldInvokeContextMenu; 402 bool m_longTapShouldInvokeContextMenu;
402 403
403 Timer<EventHandler> m_activeIntervalTimer; 404 Timer<EventHandler> m_activeIntervalTimer;
404 double m_lastShowPressTimestamp; 405 double m_lastShowPressTimestamp;
405 RefPtrWillBeMember<Element> m_lastDeferredTapElement; 406 RefPtrWillBeMember<Element> m_lastDeferredTapElement;
406 }; 407 };
407 408
408 } // namespace blink 409 } // namespace blink
409 410
410 #endif // EventHandler_h 411 #endif // EventHandler_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/hit-test-counts-expected.txt ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698