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

Unified Diff: Source/core/html/forms/DateInputType.cpp

Issue 108513007: Factor out common StepRange construction code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 | « no previous file | Source/core/html/forms/DateTimeLocalInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/DateInputType.cpp
diff --git a/Source/core/html/forms/DateInputType.cpp b/Source/core/html/forms/DateInputType.cpp
index c76e4bee6666feb6d9faa4d9c329da401c5d557f..aa5694f0e90de4b6907839de02b8ee97343aaeca 100644
--- a/Source/core/html/forms/DateInputType.cpp
+++ b/Source/core/html/forms/DateInputType.cpp
@@ -77,11 +77,7 @@ StepRange DateInputType::createStepRange(AnyStepHandling anyStepHandling) const
{
DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (dateDefaultStep, dateDefaultStepBase, dateStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger));
- const Decimal stepBase = findStepBase(0);
- const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumDate()));
- const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumDate()));
- const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr));
- return StepRange(stepBase, minimum, maximum, step, stepDescription);
+ return InputType::createStepRange(anyStepHandling, 0, Decimal::fromDouble(DateComponents::minimumDate()), Decimal::fromDouble(DateComponents::maximumDate()), stepDescription);
}
bool DateInputType::parseToDateComponentsInternal(const String& string, DateComponents* out) const
« no previous file with comments | « no previous file | Source/core/html/forms/DateTimeLocalInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698