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

Unified Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.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/FrameLoaderClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index a0f4215c3546c69052934c29d5ac46df55d0b8bf..850d2367b902e5f864e7e2d2d921376acf490023 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -469,14 +469,14 @@ void FrameLoaderClientImpl::dispatchDidChangeThemeColor() {
static bool allowCreatingBackgroundTabs() {
const WebInputEvent* inputEvent = WebViewImpl::currentInputEvent();
- if (!inputEvent || (inputEvent->type != WebInputEvent::MouseUp &&
- (inputEvent->type != WebInputEvent::RawKeyDown &&
- inputEvent->type != WebInputEvent::KeyDown) &&
- inputEvent->type != WebInputEvent::GestureTap))
+ if (!inputEvent || (inputEvent->type() != WebInputEvent::MouseUp &&
+ (inputEvent->type() != WebInputEvent::RawKeyDown &&
+ inputEvent->type() != WebInputEvent::KeyDown) &&
+ inputEvent->type() != WebInputEvent::GestureTap))
return false;
unsigned short buttonNumber;
- if (WebInputEvent::isMouseEventType(inputEvent->type)) {
+ if (WebInputEvent::isMouseEventType(inputEvent->type())) {
const WebMouseEvent* mouseEvent =
static_cast<const WebMouseEvent*>(inputEvent);
@@ -497,10 +497,10 @@ static bool allowCreatingBackgroundTabs() {
// The click is simulated when triggering the keypress event.
buttonNumber = 0;
}
- bool ctrl = inputEvent->modifiers & WebMouseEvent::ControlKey;
- bool shift = inputEvent->modifiers & WebMouseEvent::ShiftKey;
- bool alt = inputEvent->modifiers & WebMouseEvent::AltKey;
- bool meta = inputEvent->modifiers & WebMouseEvent::MetaKey;
+ bool ctrl = inputEvent->modifiers() & WebMouseEvent::ControlKey;
+ bool shift = inputEvent->modifiers() & WebMouseEvent::ShiftKey;
+ bool alt = inputEvent->modifiers() & WebMouseEvent::AltKey;
+ bool meta = inputEvent->modifiers() & WebMouseEvent::MetaKey;
NavigationPolicy userPolicy;
if (!navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta,
« no previous file with comments | « third_party/WebKit/Source/web/ExternalPopupMenu.cpp ('k') | third_party/WebKit/Source/web/InspectorOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698