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

Unified Diff: sky/engine/web/WebViewImpl.cpp

Issue 866213004: Switch Sky to pointer events (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: nits Created 5 years, 11 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
Index: sky/engine/web/WebViewImpl.cpp
diff --git a/sky/engine/web/WebViewImpl.cpp b/sky/engine/web/WebViewImpl.cpp
index eb5599180070d5bdf0a53d9cf4f4bdb2a0365ddc..827436099ccbea95bcf02b049c3252bd09a33bd9 100644
--- a/sky/engine/web/WebViewImpl.cpp
+++ b/sky/engine/web/WebViewImpl.cpp
@@ -48,6 +48,7 @@
#include "sky/engine/core/frame/FrameHost.h"
#include "sky/engine/core/frame/FrameView.h"
#include "sky/engine/core/frame/LocalFrame.h"
+#include "sky/engine/core/frame/NewEventHandler.h"
#include "sky/engine/core/frame/Settings.h"
#include "sky/engine/core/html/HTMLImportElement.h"
#include "sky/engine/core/html/ime/InputMethodContext.h"
@@ -602,6 +603,11 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent, &inputEvent);
+ if (WebInputEvent::isPointerEventType(inputEvent.type)) {
+ const WebPointerEvent& event = static_cast<const WebPointerEvent&>(inputEvent);
+ return m_page->mainFrame()->newEventHandler().handlePointerEvent(event);
+ }
+
if (m_mouseCaptureNode && WebInputEvent::isMouseEventType(inputEvent.type)) {
TRACE_EVENT1("input", "captured mouse event", "type", inputEvent.type);
// Save m_mouseCaptureNode since mouseCaptureLost() will clear it.

Powered by Google App Engine
This is Rietveld 408576698