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

Unified Diff: third_party/WebKit/Source/core/html/forms/RangeInputType.cpp

Issue 2463693002: INPUT element: Updating 'step' attribute should adjust the last value. (Closed)
Patch Set: Created 4 years, 2 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/forms/RangeInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp b/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
index 3e58947e03c6028f4ef0b5ac3d3b9c94b0405e61..e1279681c775a4663ef76de23714222eb4d5b087 100644
--- a/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
@@ -273,12 +273,16 @@ void RangeInputType::accessKeyAction(bool sendMouseEvents) {
void RangeInputType::sanitizeValueInResponseToMinOrMaxAttributeChange() {
if (element().hasDirtyValue())
element().setValue(element().value());
+ else
+ element().setNonDirtyValue(element().value());
element().updateView();
}
void RangeInputType::stepAttributeChanged() {
if (element().hasDirtyValue())
element().setValue(element().value());
+ else
+ element().setNonDirtyValue(element().value());
element().updateView();
}

Powered by Google App Engine
This is Rietveld 408576698