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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFrameSet.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/core/layout/LayoutFrameSet.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp b/third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp
index be3aa68e1c81eb1b2fbf8b213ba43ab9999d977e..6f88d569750ec58d1995028f74b1dbc5177b4b73 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp
@@ -472,7 +472,7 @@ bool LayoutFrameSet::userResize(MouseEvent* evt)
if (!m_isResizing) {
if (needsLayout())
return false;
- if (evt->type() == EventTypeNames::mousedown && evt->button() == LeftButton) {
+ if (evt->type() == EventTypeNames::mousedown && evt->button() == static_cast<short>(WebPointerProperties::Button::Left)) {
FloatPoint localPos = absoluteToLocal(FloatPoint(evt->absoluteLocation()), UseTransforms);
startResizing(m_cols, localPos.x());
startResizing(m_rows, localPos.y());
@@ -482,11 +482,11 @@ bool LayoutFrameSet::userResize(MouseEvent* evt)
}
}
} else {
- if (evt->type() == EventTypeNames::mousemove || (evt->type() == EventTypeNames::mouseup && evt->button() == LeftButton)) {
+ if (evt->type() == EventTypeNames::mousemove || (evt->type() == EventTypeNames::mouseup && evt->button() == static_cast<short>(WebPointerProperties::Button::Left))) {
FloatPoint localPos = absoluteToLocal(FloatPoint(evt->absoluteLocation()), UseTransforms);
continueResizing(m_cols, localPos.x());
continueResizing(m_rows, localPos.y());
- if (evt->type() == EventTypeNames::mouseup && evt->button() == LeftButton) {
+ if (evt->type() == EventTypeNames::mouseup && evt->button() == static_cast<short>(WebPointerProperties::Button::Left)) {
setIsResizing(false);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698