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

Unified Diff: third_party/WebKit/Source/core/html/shadow/SpinButtonElement.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/html/shadow/SpinButtonElement.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/SpinButtonElement.cpp b/third_party/WebKit/Source/core/html/shadow/SpinButtonElement.cpp
index 918e4274a34de54e2b71305e0d59e43bb507b1fb..a6c7f4720663ef3ac37d8366fd0d34fe197c9509 100644
--- a/third_party/WebKit/Source/core/html/shadow/SpinButtonElement.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/SpinButtonElement.cpp
@@ -88,7 +88,7 @@ void SpinButtonElement::defaultEventHandler(Event* event)
MouseEvent* mouseEvent = toMouseEvent(event);
IntPoint local = roundedIntPoint(box->absoluteToLocal(FloatPoint(mouseEvent->absoluteLocation()), UseTransforms));
- if (mouseEvent->type() == EventTypeNames::mousedown && mouseEvent->button() == LeftButton) {
+ if (mouseEvent->type() == EventTypeNames::mousedown && mouseEvent->button() == static_cast<short>(WebPointerProperties::Button::Left)) {
if (box->pixelSnappedBorderBoxRect().contains(local)) {
if (m_spinButtonOwner)
m_spinButtonOwner->focusAndSelectSpinButtonOwner();
@@ -105,7 +105,7 @@ void SpinButtonElement::defaultEventHandler(Event* event)
}
event->setDefaultHandled();
}
- } else if (mouseEvent->type() == EventTypeNames::mouseup && mouseEvent->button() == LeftButton) {
+ } else if (mouseEvent->type() == EventTypeNames::mouseup && mouseEvent->button() == static_cast<short>(WebPointerProperties::Button::Left)) {
releaseCapture();
} else if (event->type() == EventTypeNames::mousemove) {
if (box->pixelSnappedBorderBoxRect().contains(local)) {

Powered by Google App Engine
This is Rietveld 408576698