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

Unified Diff: third_party/WebKit/Source/core/events/MouseEvent.cpp

Issue 2675793005: Track constant InputDeviceCapabilities objects per-window. (Closed)
Patch Set: test tidying 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 5e68f976bc08bcaa534d47ce6c7076a1334c0534..9da39b5fc792ed26f2d0de0c765b930c365d4d4d 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"
@@ -163,10 +164,10 @@ MouseEvent::MouseEvent(const AtomicString& eventType,
detail,
static_cast<PlatformEvent::Modifiers>(event.modifiers()),
TimeTicks::FromSeconds(event.timeStampSeconds()),
- event.fromTouch()
- ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities()
- : InputDeviceCapabilities::
- doesntFireTouchEventsSourceCapabilities()),
+ abstractView
+ ? abstractView->getInputDeviceCapabilities()->firesTouchEvents(
+ event.fromTouch())
+ : nullptr),
m_screenLocation(event.globalX, event.globalY),
m_movementDelta(flooredIntPoint(event.movementInRootFrame())),
m_positionType(PositionType::Position),
@@ -207,10 +208,10 @@ MouseEvent::MouseEvent(const AtomicString& eventType,
detail,
modifiers,
platformTimeStamp,
- syntheticEventType == FromTouch
- ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities()
- : InputDeviceCapabilities::
- doesntFireTouchEventsSourceCapabilities()),
+ abstractView
+ ? abstractView->getInputDeviceCapabilities()->firesTouchEvents(
+ syntheticEventType == FromTouch)
+ : nullptr),
m_screenLocation(screenX, screenY),
m_movementDelta(movementX, movementY),
m_positionType(syntheticEventType == 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