| Index: Source/core/html/forms/MonthInputType.cpp
|
| diff --git a/Source/core/html/forms/MonthInputType.cpp b/Source/core/html/forms/MonthInputType.cpp
|
| index 1294ebdf56069508deabaaf31359ea43e3eb45ea..5c568d3ae9d24bfcbcf5685cc2e80b6f5cd15f53 100644
|
| --- a/Source/core/html/forms/MonthInputType.cpp
|
| +++ b/Source/core/html/forms/MonthInputType.cpp
|
| @@ -51,7 +51,7 @@ static const int monthDefaultStep = 1;
|
| static const int monthDefaultStepBase = 0;
|
| static const int monthStepScaleFactor = 1;
|
|
|
| -PassRefPtr<InputType> MonthInputType::create(HTMLInputElement* element)
|
| +PassRefPtr<InputType> MonthInputType::create(HTMLInputElement& element)
|
| {
|
| return adoptRef(new MonthInputType(element));
|
| }
|
| @@ -74,7 +74,7 @@ DateComponents::Type MonthInputType::dateType() const
|
| double MonthInputType::valueAsDate() const
|
| {
|
| DateComponents date;
|
| - if (!parseToDateComponents(element()->value(), &date))
|
| + if (!parseToDateComponents(element().value(), &date))
|
| return DateComponents::invalidMilliseconds();
|
| double msec = date.millisecondsSinceEpoch();
|
| ASSERT(std::isfinite(msec));
|
| @@ -108,10 +108,10 @@ StepRange MonthInputType::createStepRange(AnyStepHandling anyStepHandling) const
|
| {
|
| DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (monthDefaultStep, monthDefaultStepBase, monthStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger));
|
|
|
| - const Decimal stepBase = parseToNumber(element()->fastGetAttribute(minAttr), Decimal::fromDouble(monthDefaultStepBase));
|
| - const Decimal minimum = parseToNumber(element()->fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumMonth()));
|
| - const Decimal maximum = parseToNumber(element()->fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumMonth()));
|
| - const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element()->fastGetAttribute(stepAttr));
|
| + const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(monthDefaultStepBase));
|
| + const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumMonth()));
|
| + const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumMonth()));
|
| + const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr));
|
| return StepRange(stepBase, minimum, maximum, step, stepDescription);
|
| }
|
|
|
| @@ -155,9 +155,9 @@ void MonthInputType::setupLayoutParameters(DateTimeEditElement::LayoutParameters
|
| {
|
| layoutParameters.dateTimeFormat = layoutParameters.locale.monthFormat();
|
| layoutParameters.fallbackDateTimeFormat = "yyyy-MM";
|
| - 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.placeholderForMonth = "--";
|
| layoutParameters.placeholderForYear = "----";
|
|
|