Index: Source/core/html/forms/WeekInputType.cpp |
diff --git a/Source/core/html/forms/WeekInputType.cpp b/Source/core/html/forms/WeekInputType.cpp |
index 7a9f36c5d00e5b3a91d687083e5c123e4744c516..248b227656d42e1563d24c31491cf810db32f64c 100644 |
--- a/Source/core/html/forms/WeekInputType.cpp |
+++ b/Source/core/html/forms/WeekInputType.cpp |
@@ -48,7 +48,7 @@ static const int weekDefaultStepBase = -259200000; // The first day of 1970-W01. |
static const int weekDefaultStep = 1; |
static const int weekStepScaleFactor = 604800000; |
-PassRefPtr<InputType> WeekInputType::create(HTMLInputElement* element) |
+PassRefPtr<InputType> WeekInputType::create(HTMLInputElement& element) |
{ |
return adoptRef(new WeekInputType(element)); |
} |
@@ -72,10 +72,10 @@ StepRange WeekInputType::createStepRange(AnyStepHandling anyStepHandling) const |
{ |
DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (weekDefaultStep, weekDefaultStepBase, weekStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger)); |
- const Decimal stepBase = parseToNumber(element()->fastGetAttribute(minAttr), weekDefaultStepBase); |
- const Decimal minimum = parseToNumber(element()->fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumWeek())); |
- const Decimal maximum = parseToNumber(element()->fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumWeek())); |
- const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element()->fastGetAttribute(stepAttr)); |
+ const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), weekDefaultStepBase); |
+ const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumWeek())); |
+ const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumWeek())); |
+ const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr)); |
return StepRange(stepBase, minimum, maximum, step, stepDescription); |
} |
@@ -110,9 +110,9 @@ void WeekInputType::setupLayoutParameters(DateTimeEditElement::LayoutParameters& |
{ |
layoutParameters.dateTimeFormat = locale().weekFormatInLDML(); |
layoutParameters.fallbackDateTimeFormat = "yyyy-'W'ww"; |
- if (!parseToDateComponents(element()->fastGetAttribute(minAttr), &layoutParameters.minimum)) |
+ if (!parseToDateComponents(element().fastGetAttribute(minAttr), &layoutParameters.minimum)) |
layoutParameters.minimum = DateComponents(); |
- if (!parseToDateComponents(element()->fastGetAttribute(maxAttr), &layoutParameters.maximum)) |
+ if (!parseToDateComponents(element().fastGetAttribute(maxAttr), &layoutParameters.maximum)) |
layoutParameters.maximum = DateComponents(); |
layoutParameters.placeholderForYear = "----"; |
} |