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

Unified Diff: Source/core/html/forms/DateTimeLocalInputType.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/DateTimeLocalInputType.cpp
diff --git a/Source/core/html/forms/DateTimeLocalInputType.cpp b/Source/core/html/forms/DateTimeLocalInputType.cpp
index ff8b66703e62722d7c32125b39455b6eeab6244b..ea69158a9bbd73c81d357d11e7f8534cc7a837cb 100644
--- a/Source/core/html/forms/DateTimeLocalInputType.cpp
+++ b/Source/core/html/forms/DateTimeLocalInputType.cpp
@@ -86,9 +86,9 @@ StepRange DateTimeLocalInputType::createStepRange(AnyStepHandling anyStepHandlin
{
DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (dateTimeLocalDefaultStep, dateTimeLocalDefaultStepBase, dateTimeLocalStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger));
- const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), 0);
- const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumDateTime()));
- const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumDateTime()));
+ const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), element().fastGetAttribute(valueAttr), 0);
+ const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), String(), Decimal::fromDouble(DateComponents::minimumDateTime()));
+ const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), String(), Decimal::fromDouble(DateComponents::maximumDateTime()));
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