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

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

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 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: 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 9c52489da2b83afacfb98e1e45c13726ee4abe30..e7b31f24dd0fcd9b26c4c7e4aebadf2fd74af7c7 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1366,7 +1366,7 @@ WebInputEventResult EventHandler::handleGestureEvent(
// Update mouseout/leave/over/enter events before jumping directly to the
// inner most frame.
- if (targetedEvent.event().type == WebInputEvent::GestureTap)
+ if (targetedEvent.event().type() == WebInputEvent::GestureTap)
updateGestureTargetNodeForMouseEvent(targetedEvent);
// Route to the correct frame.
@@ -1617,13 +1617,13 @@ void EventHandler::updateGestureTargetNodeForMouseEvent(
}
const WebGestureEvent& gestureEvent = targetedEvent.event();
- unsigned modifiers = gestureEvent.modifiers;
+ unsigned modifiers = gestureEvent.modifiers();
PlatformMouseEvent fakeMouseMove(
gestureEvent, WebPointerProperties::Button::NoButton,
PlatformEvent::MouseMoved,
/* clickCount */ 0, static_cast<PlatformEvent::Modifiers>(modifiers),
PlatformMouseEvent::FromTouch,
- TimeTicks::FromSeconds(gestureEvent.timeStampSeconds),
+ TimeTicks::FromSeconds(gestureEvent.timeStampSeconds()),
WebPointerProperties::PointerType::Mouse);
// Update the mouseout/mouseleave event
@@ -1658,12 +1658,12 @@ GestureEventWithHitTestResults EventHandler::targetGestureEvent(
ASSERT(!gestureEvent.isScrollEvent());
HitTestRequest::HitTestRequestType hitType =
- m_gestureManager->getHitTypeForGestureType(gestureEvent.type);
+ m_gestureManager->getHitTypeForGestureType(gestureEvent.type());
TimeDelta activeInterval;
bool shouldKeepActiveForMinInterval = false;
if (readOnly) {
hitType |= HitTestRequest::ReadOnly;
- } else if (gestureEvent.type == WebInputEvent::GestureTap) {
+ } else if (gestureEvent.type() == WebInputEvent::GestureTap) {
// If the Tap is received very shortly after ShowPress, we want to
// delay clearing of the active state so that it's visible to the user
// for at least a couple of frames.
@@ -1752,7 +1752,7 @@ void EventHandler::applyTouchAdjustment(WebGestureEvent* gestureEvent,
Node* adjustedNode = nullptr;
IntPoint adjustedPoint = flooredIntPoint(gestureEvent->positionInRootFrame());
bool adjusted = false;
- switch (gestureEvent->type) {
+ switch (gestureEvent->type()) {
case WebInputEvent::GestureTap:
case WebInputEvent::GestureTapUnconfirmed:
case WebInputEvent::GestureTapDown:
« no previous file with comments | « third_party/WebKit/Source/core/events/MouseEvent.cpp ('k') | third_party/WebKit/Source/core/input/EventHandlerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698