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

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

Issue 470833002: Add WebKit API for doing a hit-test that mimics GestureTap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rewrite based on Rick's comments Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/page/EventHandler.cpp » ('j') | Source/web/WebViewImpl.cpp » ('J')
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Called on the local root frame exactly once per gesture event. 145 // Called on the local root frame exactly once per gesture event.
146 bool handleGestureEvent(const PlatformGestureEvent&); 146 bool handleGestureEvent(const PlatformGestureEvent&);
147 bool handleGestureEvent(const GestureEventWithHitTestResults&); 147 bool handleGestureEvent(const GestureEventWithHitTestResults&);
148 148
149 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme nt and updating 149 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme nt and updating
150 // hover/active state across all frames if necessary. This should be called at most once 150 // hover/active state across all frames if necessary. This should be called at most once
151 // per gesture event, and called on the local root frame. 151 // per gesture event, and called on the local root frame.
152 // Note: This is similar to (the less clearly named) prepareMouseEvent. 152 // Note: This is similar to (the less clearly named) prepareMouseEvent.
153 // FIXME: Remove readOnly param when there is only ever a single call to thi s. 153 // FIXME: Remove readOnly param when there is only ever a single call to thi s.
154 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent &, bool readOnly = false); 154 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent &, bool readOnly = false);
155 155 GestureEventWithHitTestResults hitTestResultForGestureEvent(const PlatformGe stureEvent&, HitTestRequest::HitTestRequestType);
156 // Handle the provided non-scroll gesture event. Should be called only on th e inner frame. 156 // Handle the provided non-scroll gesture event. Should be called only on th e inner frame.
157 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&); 157 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&);
158 158
159 // Handle the provided scroll gesture event, propagating down to child frame s as necessary. 159 // Handle the provided scroll gesture event, propagating down to child frame s as necessary.
160 bool handleGestureScrollEvent(const PlatformGestureEvent&); 160 bool handleGestureScrollEvent(const PlatformGestureEvent&);
161 bool handleGestureScrollEnd(const PlatformGestureEvent&); 161 bool handleGestureScrollEnd(const PlatformGestureEvent&);
162 bool isScrollbarHandlingGestures() const; 162 bool isScrollbarHandlingGestures() const;
163 163
164 bool bestClickableNodeForHitTestResult(const HitTestResult&, IntPoint& targe tPoint, Node*& targetNode); 164 bool bestClickableNodeForHitTestResult(const HitTestResult&, IntPoint& targe tPoint, Node*& targetNode);
165 bool bestContextMenuNodeForHitTestResult(const HitTestResult&, IntPoint& tar getPoint, Node*& targetNode); 165 bool bestContextMenuNodeForHitTestResult(const HitTestResult&, IntPoint& tar getPoint, Node*& targetNode);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 bool m_longTapShouldInvokeContextMenu; 400 bool m_longTapShouldInvokeContextMenu;
401 401
402 Timer<EventHandler> m_activeIntervalTimer; 402 Timer<EventHandler> m_activeIntervalTimer;
403 double m_lastShowPressTimestamp; 403 double m_lastShowPressTimestamp;
404 RefPtrWillBeMember<Element> m_lastDeferredTapElement; 404 RefPtrWillBeMember<Element> m_lastDeferredTapElement;
405 }; 405 };
406 406
407 } // namespace blink 407 } // namespace blink
408 408
409 #endif // EventHandler_h 409 #endif // EventHandler_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/EventHandler.cpp » ('j') | Source/web/WebViewImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698