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

Unified Diff: Source/core/html/shadow/SpinButtonElement.cpp

Issue 196933006: Do not dispatch 'change' events during pressing spin buttons for input[type=number]. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test code updated Created 6 years, 8 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
« no previous file with comments | « Source/core/html/shadow/SpinButtonElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..79d4e2297334e6da62050d282052340a3101a7a9 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()) {
@@ -111,7 +105,7 @@ void SpinButtonElement::defaultEventHandler(Event* event)
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 +192,9 @@ void SpinButtonElement::releaseCapture()
page->chrome().unregisterPopupOpeningObserver(this);
}
}
+ if (m_spinButtonOwner)
+ m_spinButtonOwner->spinButtonDidReleaseMouseCapture();
+
}
bool SpinButtonElement::matchesReadOnlyPseudoClass() const
« no previous file with comments | « Source/core/html/shadow/SpinButtonElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698