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

Unified Diff: third_party/WebKit/Source/core/events/MouseEvent.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/events/MouseEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/MouseEvent.cpp b/third_party/WebKit/Source/core/events/MouseEvent.cpp
index da7a86940579bae1224eb6205bbe0702544c44a4..408cf3b1451bda10319b3c786943b046418bdaa9 100644
--- a/third_party/WebKit/Source/core/events/MouseEvent.cpp
+++ b/third_party/WebKit/Source/core/events/MouseEvent.cpp
@@ -29,6 +29,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
+#include "core/input/InputDeviceCapabilities.h"
#include "core/layout/LayoutObject.h"
#include "core/paint/PaintLayer.h"
#include "core/svg/SVGElement.h"
@@ -197,10 +198,10 @@ MouseEvent::MouseEvent(
0,
static_cast<PlatformEvent::Modifiers>(event.modifiers()),
TimeTicks::FromSeconds(event.timeStampSeconds()),
- syntheticEventType == PlatformMouseEvent::FromTouch
- ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities()
- : InputDeviceCapabilities::
- doesntFireTouchEventsSourceCapabilities()),
+ abstractView
+ ? abstractView->getInputDeviceCapabilities()->firesTouchEvents(
+ syntheticEventType == PlatformMouseEvent::FromTouch)
+ : nullptr),
m_screenLocation(event.globalX, event.globalY),
m_movementDelta(flooredIntPoint(event.movementInRootFrame())),
m_positionType(syntheticEventType == PlatformMouseEvent::Positionless
@@ -243,10 +244,10 @@ MouseEvent::MouseEvent(
detail,
modifiers,
platformTimeStamp,
- syntheticEventType == PlatformMouseEvent::FromTouch
- ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities()
- : InputDeviceCapabilities::
- doesntFireTouchEventsSourceCapabilities()),
+ abstractView
+ ? abstractView->getInputDeviceCapabilities()->firesTouchEvents(
+ syntheticEventType == PlatformMouseEvent::FromTouch)
+ : nullptr),
m_screenLocation(screenX, screenY),
m_movementDelta(movementX, movementY),
m_positionType(syntheticEventType == PlatformMouseEvent::Positionless
« no previous file with comments | « third_party/WebKit/Source/core/events/KeyboardEvent.cpp ('k') | third_party/WebKit/Source/core/events/TouchEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698