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

Unified Diff: Source/web/WebDevToolsAgentImpl.cpp

Issue 23085004: DevTools: handle gesture tap event while in inspecting element mode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « Source/core/inspector/InspectorOverlay.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDevToolsAgentImpl.cpp
diff --git a/Source/web/WebDevToolsAgentImpl.cpp b/Source/web/WebDevToolsAgentImpl.cpp
index 8d60e2109bba080048e3e0bbe3d30979ce59e6f8..3ea57461e1f04a4afdb6945bace2e56716c7c819 100644
--- a/Source/web/WebDevToolsAgentImpl.cpp
+++ b/Source/web/WebDevToolsAgentImpl.cpp
@@ -464,10 +464,18 @@ void WebDevToolsAgentImpl::webViewResized(const WebSize& size)
bool WebDevToolsAgentImpl::handleInputEvent(WebCore::Page* page, const WebInputEvent& inputEvent)
{
+ if (!m_attached)
+ return false;
+
InspectorController* ic = inspectorController();
if (!ic)
return false;
+ 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(page->mainFrame()->view(), *static_cast<const WebGestureEvent*>(&inputEvent));
+ return ic->handleGestureEvent(page->mainFrame(), gestureEvent);
+ }
if (WebInputEvent::isMouseEventType(inputEvent.type) && inputEvent.type != WebInputEvent::MouseEnter) {
// PlatformMouseEventBuilder does not work with MouseEnter type, so we filter it out manually.
PlatformMouseEvent mouseEvent = PlatformMouseEventBuilder(page->mainFrame()->view(), *static_cast<const WebMouseEvent*>(&inputEvent));
« no previous file with comments | « Source/core/inspector/InspectorOverlay.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698