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

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

Issue 2687903002: Track constant InputDeviceCapabilities objects per-window. (Closed)
Patch Set: Created 3 years, 10 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: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index e7b31f24dd0fcd9b26c4c7e4aebadf2fd74af7c7..41cb83e76a3dba6bad0df20b3f499a874f7ed1d0 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -679,9 +679,13 @@ WebInputEventResult EventHandler::handleMousePressEvent(
HitTestResult hitTestResult = EventHandlingUtil::hitTestResultInFrame(
m_frame, documentPoint, HitTestRequest::ReadOnly);
InputDeviceCapabilities* sourceCapabilities =
- mouseEvent.getSyntheticEventType() == PlatformMouseEvent::FromTouch
- ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities()
- : InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities();
+ m_frame->document()
+ ->domWindow()
+ ->getInputDeviceCapabilities()
+ ->firesTouchEvents(
+ mouseEvent.getSyntheticEventType() ==
+ PlatformMouseEvent::FromTouch);
+
if (eventResult == WebInputEventResult::NotHandled) {
eventResult = m_mouseEventManager->handleMouseFocus(hitTestResult,
sourceCapabilities);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSelectElement.cpp ('k') | third_party/WebKit/Source/core/input/GestureManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698