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

Unified Diff: third_party/WebKit/Source/web/InspectorOverlay.cpp

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Add missing copyright on new file Created 4 years 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: third_party/WebKit/Source/web/InspectorOverlay.cpp
diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp
index d566b1120887d49a2029f0d4dfa0654512d17936..70c547c4cb979ae1eac80d91e3de373128f08424 100644
--- a/third_party/WebKit/Source/web/InspectorOverlay.cpp
+++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
@@ -81,9 +81,11 @@ Node* hoveredNodeForPoint(LocalFrame* frame,
}
Node* hoveredNodeForEvent(LocalFrame* frame,
- const PlatformGestureEvent& event,
+ const WebGestureEvent& event,
bool ignorePointerEventsNone) {
- return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone);
+ return hoveredNodeForPoint(frame,
+ roundedIntPoint(event.positionInRootFrame()),
+ ignorePointerEventsNone);
}
Node* hoveredNodeForEvent(LocalFrame* frame,
@@ -234,16 +236,15 @@ bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) {
if (WebInputEvent::isGestureEventType(inputEvent.type) &&
inputEvent.type == WebInputEvent::GestureTap) {
- // Only let GestureTab in (we only need it and we know
- // PlatformGestureEventBuilder supports it).
- PlatformGestureEvent gestureEvent = PlatformGestureEventBuilder(
+ // We only have a use for gesture tap.
+ WebGestureEvent scaledEvent = TransformWebGestureEvent(
m_frameImpl->frameView(),
static_cast<const WebGestureEvent&>(inputEvent));
- handled = handleGestureEvent(gestureEvent);
+ handled = handleGestureEvent(scaledEvent);
if (handled)
return true;
- overlayMainFrame()->eventHandler().handleGestureEvent(gestureEvent);
+ overlayMainFrame()->eventHandler().handleGestureEvent(scaledEvent);
}
if (WebInputEvent::isMouseEventType(inputEvent.type) &&
inputEvent.type != WebInputEvent::MouseEnter) {
@@ -757,8 +758,8 @@ bool InspectorOverlay::handleMousePress() {
return false;
}
-bool InspectorOverlay::handleGestureEvent(const PlatformGestureEvent& event) {
- if (!shouldSearchForNode() || event.type() != PlatformEvent::GestureTap)
+bool InspectorOverlay::handleGestureEvent(const WebGestureEvent& event) {
+ if (!shouldSearchForNode() || event.type != WebInputEvent::GestureTap)
return false;
Node* node = hoveredNodeForEvent(m_frameImpl->frame(), event, false);
if (node && m_inspectModeHighlightConfig) {
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.h ('k') | third_party/WebKit/Source/web/LinkHighlightImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698