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

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

Issue 2366753004: input[type=range]: Updating step attribute should align the value to steps. (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/Source/core/html/forms/RangeInputType.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5b1a738b12174e013a14a408c35f2ab128ad1bcb..99c65ab40b788f5ff1ac69c738173b12de8475a0 100644
--- a/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
@@ -273,6 +273,13 @@ void RangeInputType::sanitizeValueInResponseToMinOrMaxAttributeChange()
element().updateView();
}
+void RangeInputType::stepAttributeChanged()
+{
+ if (element().hasDirtyValue())
+ element().setValue(element().value());
+ element().updateView();
+}
+
void RangeInputType::setValue(const String& value, bool valueChanged, TextFieldEventBehavior eventBehavior)
{
InputType::setValue(value, valueChanged, eventBehavior);
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/RangeInputType.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698