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 22f4255e658a0f763186abbf5bdb8323c2437bd8..35833bdb1a7a2a4f2dfa8750c7b428e99e2bc0d8 100644 |
| --- a/Source/core/html/shadow/SpinButtonElement.cpp |
| +++ b/Source/core/html/shadow/SpinButtonElement.cpp |
| @@ -60,12 +60,6 @@ PassRefPtr<SpinButtonElement> SpinButtonElement::create(Document& document, Spin |
| return element.release(); |
| } |
| -void SpinButtonElement::detach(const AttachContext& context) |
| -{ |
| - releaseCapture(); |
| - HTMLDivElement::detach(context); |
| -} |
| - |
| void SpinButtonElement::defaultEventHandler(Event* event) |
| { |
| if (!event->isMouseEvent()) { |
| @@ -106,12 +100,14 @@ void SpinButtonElement::defaultEventHandler(Event* event) |
| // chance to cancel the timer. |
| startRepeatingTimer(); |
| doStepAction(m_upDownState == Up ? 1 : -1); |
| + if (m_spinButtonOwner) |
| + m_spinButtonOwner->spinButtonDidReleaseMouseCapture(); |
|
tkent
2014/04/07 04:31:17
Why pinButtonDidReleaseMouseCapture is called? We
Habib Virji
2014/04/07 07:33:18
Done.
|
| } |
| } |
| event->setDefaultHandled(); |
| } |
| } else if (mouseEvent->type() == EventTypeNames::mouseup && mouseEvent->button() == LeftButton) { |
| - stopRepeatingTimer(); |
| + releaseCapture(); |
| } else if (event->type() == EventTypeNames::mousemove) { |
| if (box->pixelSnappedBorderBoxRect().contains(local)) { |
| if (!m_capturing) { |
| @@ -198,6 +194,9 @@ void SpinButtonElement::releaseCapture() |
| page->chrome().unregisterPopupOpeningObserver(this); |
| } |
| } |
| + if (m_spinButtonOwner) |
| + m_spinButtonOwner->spinButtonDidReleaseMouseCapture(); |
| + |
| } |
| bool SpinButtonElement::matchesReadOnlyPseudoClass() const |