Chromium Code Reviews| Index: Source/core/html/shadow/SpinButtonElement.cpp |
| diff --git a/Source/core/html/shadow/SpinButtonElement.cpp b/Source/core/html/shadow/SpinButtonElement.cpp |
| index e0e30ae17a3cb02deea90ef60495bdf139a18277..25c24cac74f0ae3861e6d17f1a1b00cb332497f6 100644 |
| --- a/Source/core/html/shadow/SpinButtonElement.cpp |
| +++ b/Source/core/html/shadow/SpinButtonElement.cpp |
| @@ -31,6 +31,7 @@ |
| #include "core/events/MouseEvent.h" |
| #include "core/events/ThreadLocalEventNames.h" |
| #include "core/events/WheelEvent.h" |
| +#include "core/html/HTMLInputElement.h" |
| #include "core/html/shadow/ShadowElementNames.h" |
| #include "core/page/Chrome.h" |
| #include "core/page/EventHandler.h" |
| @@ -111,9 +112,9 @@ void SpinButtonElement::defaultEventHandler(Event* event) |
| } |
| event->setDefaultHandled(); |
| } |
| - } else if (mouseEvent->type() == EventTypeNames::mouseup && mouseEvent->button() == LeftButton) |
| - stopRepeatingTimer(); |
| - else if (event->type() == EventTypeNames::mousemove) { |
| + } else if (mouseEvent->type() == EventTypeNames::mouseup && mouseEvent->button() == LeftButton) { |
| + releaseCapture(); |
| + } else if (event->type() == EventTypeNames::mousemove) { |
| if (box->pixelSnappedBorderBoxRect().contains(local)) { |
| if (!m_capturing) { |
| if (Frame* frame = document().frame()) { |
| @@ -198,6 +199,8 @@ void SpinButtonElement::releaseCapture() |
| if (Page* page = document().page()) |
| page->chrome().unregisterPopupOpeningObserver(this); |
| } |
| + HTMLInputElement* input = toHTMLInputElement(shadowHost()); |
|
tkent
2014/01/16 06:05:19
Please do not add dependency to HTMLInputElement.
Habib Virji
2014/01/16 09:49:18
OK will update code accordingly and send a new pat
|
| + input->dispatchFormControlChangeEvent(); |
| } |
| } |