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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.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/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index 4855f044552b80c724fe6958c549476572e942ea..e5712bb613f807a4273fbe62cd9d4562896d7ea6 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -278,7 +278,7 @@ void updatePolicyForEvent(const WebInputEvent* inputEvent,
return;
unsigned short buttonNumber = 0;
- if (inputEvent->type == WebInputEvent::MouseUp) {
+ if (inputEvent->type() == WebInputEvent::MouseUp) {
const WebMouseEvent* mouseEvent =
static_cast<const WebMouseEvent*>(inputEvent);
@@ -295,20 +295,20 @@ void updatePolicyForEvent(const WebInputEvent* inputEvent,
default:
return;
}
- } else if ((WebInputEvent::isKeyboardEventType(inputEvent->type) &&
+ } else if ((WebInputEvent::isKeyboardEventType(inputEvent->type()) &&
static_cast<const WebKeyboardEvent*>(inputEvent)
->windowsKeyCode == VKEY_RETURN) ||
- WebInputEvent::isGestureEventType(inputEvent->type)) {
+ WebInputEvent::isGestureEventType(inputEvent->type())) {
// Keyboard and gesture events can simulate mouse events.
buttonNumber = 0;
} else {
return;
}
- bool ctrl = inputEvent->modifiers & WebInputEvent::ControlKey;
- bool shift = inputEvent->modifiers & WebInputEvent::ShiftKey;
- bool alt = inputEvent->modifiers & WebInputEvent::AltKey;
- bool meta = inputEvent->modifiers & WebInputEvent::MetaKey;
+ bool ctrl = inputEvent->modifiers() & WebInputEvent::ControlKey;
+ bool shift = inputEvent->modifiers() & WebInputEvent::ShiftKey;
+ bool alt = inputEvent->modifiers() & WebInputEvent::AltKey;
+ bool meta = inputEvent->modifiers() & WebInputEvent::MetaKey;
NavigationPolicy userPolicy = *policy;
navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta,
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.cpp ('k') | third_party/WebKit/Source/web/DevToolsEmulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698