Index: Source/core/html/shadow/SpinButtonElement.cpp |
diff --git a/Source/core/html/shadow/SpinButtonElement.cpp b/Source/core/html/shadow/SpinButtonElement.cpp |
index 04e21b86af6f1ea332e91be804b0b1b0519bbc43..7f1e90c79a2980ec267c4b4934571a3615cfad49 100644 |
--- a/Source/core/html/shadow/SpinButtonElement.cpp |
+++ b/Source/core/html/shadow/SpinButtonElement.cpp |
@@ -47,6 +47,7 @@ inline SpinButtonElement::SpinButtonElement(Document& document, SpinButtonOwner& |
: HTMLDivElement(document) |
, m_spinButtonOwner(&spinButtonOwner) |
, m_capturing(false) |
+ , m_mouseUpEvent(false) |
, m_upDownState(Indeterminate) |
, m_pressStartingState(Indeterminate) |
, m_repeatingTimer(this, &SpinButtonElement::repeatingTimerFired) |
@@ -112,6 +113,7 @@ void SpinButtonElement::defaultEventHandler(Event* event) |
event->setDefaultHandled(); |
} |
} else if (mouseEvent->type() == EventTypeNames::mouseup && mouseEvent->button() == LeftButton) { |
+ m_mouseUpEvent = true; |
tkent
2014/02/07 08:58:17
This means we call dispatchFormControlChangeEvent
|
releaseCapture(); |
} else if (event->type() == EventTypeNames::mousemove) { |
if (box->pixelSnappedBorderBoxRect().contains(local)) { |
@@ -198,8 +200,10 @@ void SpinButtonElement::releaseCapture() |
if (Page* page = document().page()) |
page->chrome().unregisterPopupOpeningObserver(this); |
} |
- if (m_spinButtonOwner) |
- m_spinButtonOwner->spinButtonDidReleaseMouseCapture(); |
+ } |
+ if (m_spinButtonOwner && m_mouseUpEvent) { |
+ m_spinButtonOwner->spinButtonDidReleaseMouseCapture(); |
+ m_mouseUpEvent = false; |
} |
} |