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

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

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 years, 4 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/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index 00019763ee4cf1d48304aba633f2e084422ff763..3ed0698ffd30d902cf32ad9cfd1ec0809747ce09 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -917,7 +917,7 @@ void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv
// If the hit node is a plugin but a scrollbar is over it don't start mouse
// capture because it will interfere with the scrollbar receiving events.
IntPoint point(event.x, event.y);
- if (event.button == WebMouseEvent::ButtonLeft) {
+ if (event.button == WebMouseEvent::Button::Left) {
point = m_localRoot->frameView()->rootFrameToContents(point);
HitTestResult result(m_localRoot->frame()->eventHandler().hitTestResultAtPoint(point));
result.setToShadowHostIfInUserAgentShadowRoot();
@@ -931,16 +931,16 @@ void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv
PageWidgetEventHandler::handleMouseDown(mainFrame, event);
- if (event.button == WebMouseEvent::ButtonLeft && m_mouseCaptureNode)
+ if (event.button == WebMouseEvent::Button::Left && m_mouseCaptureNode)
m_mouseCaptureGestureToken = mainFrame.eventHandler().takeLastMouseDownGestureToken();
// Dispatch the contextmenu event regardless of if the click was swallowed.
if (!page()->settings().showContextMenuOnMouseUp()) {
#if OS(MACOSX)
- if (event.button == WebMouseEvent::ButtonRight || (event.button == WebMouseEvent::ButtonLeft && event.modifiers & WebMouseEvent::ControlKey))
+ if (event.button == WebMouseEvent::Button::Right || (event.button == WebMouseEvent::Button::Left && event.modifiers & WebMouseEvent::ControlKey))
mouseContextMenu(event);
#else
- if (event.button == WebMouseEvent::ButtonRight)
+ if (event.button == WebMouseEvent::Button::Right)
mouseContextMenu(event);
#endif
}
@@ -988,7 +988,7 @@ void WebFrameWidgetImpl::handleMouseUp(LocalFrame& mainFrame, const WebMouseEven
if (page()->settings().showContextMenuOnMouseUp()) {
// Dispatch the contextmenu event regardless of if the click was swallowed.
// On Mac/Linux, we handle it on mouse down, not up.
- if (event.button == WebMouseEvent::ButtonRight)
+ if (event.button == WebMouseEvent::Button::Right)
mouseContextMenu(event);
}
}
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp ('k') | third_party/WebKit/Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698