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

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

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 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
Index: third_party/WebKit/Source/core/input/GestureManager.cpp
diff --git a/third_party/WebKit/Source/core/input/GestureManager.cpp b/third_party/WebKit/Source/core/input/GestureManager.cpp
index bb56ddba8fd8f4a17637580c017a1e3880187b65..8d4d8390eb015b979de2c88dc43261cbc08c0766 100644
--- a/third_party/WebKit/Source/core/input/GestureManager.cpp
+++ b/third_party/WebKit/Source/core/input/GestureManager.cpp
@@ -144,7 +144,7 @@ WebInputEventResult GestureManager::handleGestureTap(const GestureEventWithHitTe
if (!m_suppressMouseEventsFromGestures) {
PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.globalPosition(),
- NoButton, PlatformEvent::MouseMoved, /* clickCount */ 0,
+ WebPointerProperties::Button::NoButton, PlatformEvent::MouseMoved, /* clickCount */ 0,
static_cast<PlatformEvent::Modifiers>(modifiers),
PlatformMouseEvent::FromTouch, gestureEvent.timestamp(), WebPointerProperties::PointerType::Mouse);
m_frame->eventHandler().dispatchMouseEvent(EventTypeNames::mousemove, currentHitTest.innerNode(), 0, fakeMouseMove);
@@ -176,7 +176,7 @@ WebInputEventResult GestureManager::handleGestureTap(const GestureEventWithHitTe
m_frame->eventHandler().setClickNode(tappedNonTextNode);
PlatformMouseEvent fakeMouseDown(gestureEvent.position(), gestureEvent.globalPosition(),
- LeftButton, PlatformEvent::MousePressed, gestureEvent.tapCount(),
+ WebPointerProperties::Button::Left, PlatformEvent::MousePressed, gestureEvent.tapCount(),
static_cast<PlatformEvent::Modifiers>(modifiers | PlatformEvent::LeftButtonDown),
PlatformMouseEvent::FromTouch, gestureEvent.timestamp(), WebPointerProperties::PointerType::Mouse);
@@ -209,7 +209,7 @@ WebInputEventResult GestureManager::handleGestureTap(const GestureEventWithHitTe
}
PlatformMouseEvent fakeMouseUp(gestureEvent.position(), gestureEvent.globalPosition(),
- LeftButton, PlatformEvent::MouseReleased, gestureEvent.tapCount(),
+ WebPointerProperties::Button::Left, PlatformEvent::MouseReleased, gestureEvent.tapCount(),
static_cast<PlatformEvent::Modifiers>(modifiers),
PlatformMouseEvent::FromTouch, gestureEvent.timestamp(), WebPointerProperties::PointerType::Mouse);
WebInputEventResult mouseUpEventResult = m_suppressMouseEventsFromGestures
@@ -293,7 +293,7 @@ WebInputEventResult GestureManager::sendContextMenuEventForGesture(const Gesture
if (!m_suppressMouseEventsFromGestures) {
// Send MouseMoved event prior to handling (https://crbug.com/485290).
PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.globalPosition(),
- NoButton, PlatformEvent::MouseMoved, /* clickCount */ 0,
+ WebPointerProperties::Button::NoButton, PlatformEvent::MouseMoved, /* clickCount */ 0,
static_cast<PlatformEvent::Modifiers>(modifiers),
PlatformMouseEvent::FromTouch, gestureEvent.timestamp(), WebPointerProperties::PointerType::Mouse);
m_frame->eventHandler().dispatchMouseEvent(
@@ -306,7 +306,7 @@ WebInputEventResult GestureManager::sendContextMenuEventForGesture(const Gesture
// To simulate right-click behavior, we send a right mouse down and then context menu event.
// TODO(crbug.com/579564): Maybe we should not send mouse down at all
- PlatformMouseEvent mouseEvent(targetedEvent.event().position(), targetedEvent.event().globalPosition(), RightButton, eventType, 1,
+ PlatformMouseEvent mouseEvent(targetedEvent.event().position(), targetedEvent.event().globalPosition(), WebPointerProperties::Button::Right, eventType, 1,
static_cast<PlatformEvent::Modifiers>(modifiers | PlatformEvent::RightButtonDown),
PlatformMouseEvent::FromTouch, WTF::monotonicallyIncreasingTime(), WebPointerProperties::PointerType::Mouse);
if (!m_suppressMouseEventsFromGestures) {
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandlerTest.cpp ('k') | third_party/WebKit/Source/core/input/PointerEventManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698