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

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

Issue 83413002: Derive the step base for an input element as (now) specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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: Source/core/html/forms/TimeInputType.cpp
diff --git a/Source/core/html/forms/TimeInputType.cpp b/Source/core/html/forms/TimeInputType.cpp
index cc135bd2e8a7c510ff034cf64899e6a2dea1a1b0..58afdb9c28b24b765bb9f7581ebd05637dd9e5c9 100644
--- a/Source/core/html/forms/TimeInputType.cpp
+++ b/Source/core/html/forms/TimeInputType.cpp
@@ -95,9 +95,9 @@ StepRange TimeInputType::createStepRange(AnyStepHandling anyStepHandling) const
{
DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (timeDefaultStep, timeDefaultStepBase, timeStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger));
- const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), 0);
- const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumTime()));
- const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumTime()));
+ const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), element().fastGetAttribute(valueAttr), 0);
+ const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), String(), Decimal::fromDouble(DateComponents::minimumTime()));
+ const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), String(), Decimal::fromDouble(DateComponents::maximumTime()));
const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr));
return StepRange(stepBase, minimum, maximum, step, stepDescription);
}

Powered by Google App Engine
This is Rietveld 408576698