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

Unified Diff: Source/core/input/EventHandler.cpp

Issue 1176423008: Forward mouse down node information to WebWidgetClient (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add ASSERT for event type Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/page/ChromeClient.h » ('j') | public/web/WebWidgetClient.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/input/EventHandler.cpp
diff --git a/Source/core/input/EventHandler.cpp b/Source/core/input/EventHandler.cpp
index 19698b6bf5a0b587896378adc6a5058273c8515d..e1f1fd7feb716017e190974ca5ba877e71635c0b 100644
--- a/Source/core/input/EventHandler.cpp
+++ b/Source/core/input/EventHandler.cpp
@@ -998,6 +998,13 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
swallowEvent = handleMousePressEvent(mev);
}
+ if (mev.hitTestResult().innerNode() && mouseEvent.button() == LeftButton) {
+ ASSERT(mouseEvent.type() == PlatformEvent::MousePressed);
+ HitTestResult result = mev.hitTestResult();
+ result.setToShadowHostIfInUserAgentShadowRoot();
+ m_frame->chromeClient().onClickInput(result.innerNode());
+ }
+
return swallowEvent;
}
@@ -2074,6 +2081,14 @@ bool EventHandler::handleGestureTap(const GestureEventWithHitTestResults& target
IntPoint tappedPositionInViewport = m_frame->page()->frameHost().pinchViewport().rootFrameToViewport(tappedPosition);
m_frame->chromeClient().showUnhandledTapUIIfNeeded(tappedPositionInViewport, tappedNode.get(), domTreeChanged || styleChanged);
}
+
+ if (currentHitTest.innerNode()) {
Rick Byers 2015/06/18 17:02:10 If we're going to invoke this after mousedown for
Yufeng Shen (Slow to review) 2015/06/18 18:29:03 done. Moved the onMouseDown() up to right after h
+ ASSERT(gestureEvent.type() == PlatformEvent::GestureTap);
+ HitTestResult result = currentHitTest;
+ result.setToShadowHostIfInUserAgentShadowRoot();
+ m_frame->chromeClient().onClickInput(result.innerNode());
+ }
+
return swallowed;
}
« no previous file with comments | « no previous file | Source/core/page/ChromeClient.h » ('j') | public/web/WebWidgetClient.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698