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

Unified Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Created 4 years 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 1791624cfa73dd07961aedeb6c96e9dd771cc6c1..b6390824c9eaecac2d1ec412abd65edc73c1f411 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -474,14 +474,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);
@@ -502,10 +502,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,

Powered by Google App Engine
This is Rietveld 408576698