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

Unified Diff: third_party/WebKit/Source/web/InspectorOverlay.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/web/InspectorOverlay.cpp
diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp
index a81df3fbb7edde0bf3f4405d15d65baf5300a499..85e7b65889d329691fc33f4475308d442a0c9466 100644
--- a/third_party/WebKit/Source/web/InspectorOverlay.cpp
+++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
@@ -234,8 +234,7 @@ bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) {
if (isEmpty())
return false;
- if (WebInputEvent::isGestureEventType(inputEvent.type) &&
- inputEvent.type == WebInputEvent::GestureTap) {
+ if (inputEvent.type() == WebInputEvent::GestureTap) {
// We only have a use for gesture tap.
WebGestureEvent transformedEvent = TransformWebGestureEvent(
m_frameImpl->frameView(),
@@ -246,8 +245,8 @@ bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) {
overlayMainFrame()->eventHandler().handleGestureEvent(transformedEvent);
}
- if (WebInputEvent::isMouseEventType(inputEvent.type) &&
- inputEvent.type != WebInputEvent::MouseEnter) {
+ if (WebInputEvent::isMouseEventType(inputEvent.type()) &&
+ inputEvent.type() != WebInputEvent::MouseEnter) {
// PlatformMouseEventBuilder does not work with MouseEnter type, so we
// filter it out manually.
PlatformMouseEvent mouseEvent = PlatformMouseEventBuilder(
@@ -277,7 +276,7 @@ bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) {
mouseEvent) != WebInputEventResult::NotHandled;
}
- if (WebInputEvent::isTouchEventType(inputEvent.type)) {
+ if (WebInputEvent::isTouchEventType(inputEvent.type())) {
PlatformTouchEvent touchEvent = PlatformTouchEventBuilder(
m_frameImpl->frameView(),
static_cast<const WebTouchEvent&>(inputEvent));
@@ -289,12 +288,12 @@ bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) {
createPlatformTouchEventVector(m_frameImpl->frameView(),
std::vector<const WebInputEvent*>()));
}
- if (WebInputEvent::isKeyboardEventType(inputEvent.type)) {
+ if (WebInputEvent::isKeyboardEventType(inputEvent.type())) {
overlayMainFrame()->eventHandler().keyEvent(
static_cast<const WebKeyboardEvent&>(inputEvent));
}
- if (inputEvent.type == WebInputEvent::MouseWheel) {
+ if (inputEvent.type() == WebInputEvent::MouseWheel) {
WebMouseWheelEvent transformedEvent = TransformWebMouseWheelEvent(
m_frameImpl->frameView(),
static_cast<const WebMouseWheelEvent&>(inputEvent));
@@ -760,7 +759,7 @@ bool InspectorOverlay::handleMousePress() {
}
bool InspectorOverlay::handleGestureEvent(const WebGestureEvent& event) {
- if (!shouldSearchForNode() || event.type != WebInputEvent::GestureTap)
+ if (!shouldSearchForNode() || event.type() != WebInputEvent::GestureTap)
return false;
Node* node = hoveredNodeForEvent(m_frameImpl->frame(), event, false);
if (node && m_inspectModeHighlightConfig) {
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp ('k') | third_party/WebKit/Source/web/PageWidgetDelegate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698