Index: Source/core/html/shadow/DateTimeFieldElements.cpp |
diff --git a/Source/core/html/shadow/DateTimeFieldElements.cpp b/Source/core/html/shadow/DateTimeFieldElements.cpp |
index d9b59c6be6cef616483d338ee08862f43423d660..9ffa69f1795aaab94e8869ec4c4da734d27d6b5c 100644 |
--- a/Source/core/html/shadow/DateTimeFieldElements.cpp |
+++ b/Source/core/html/shadow/DateTimeFieldElements.cpp |
@@ -35,12 +35,12 @@ |
namespace WebCore { |
-DateTimeAMPMFieldElement::DateTimeAMPMFieldElement(Document* document, FieldOwner& fieldOwner, const Vector<String>& ampmLabels) |
+DateTimeAMPMFieldElement::DateTimeAMPMFieldElement(Document& document, FieldOwner& fieldOwner, const Vector<String>& ampmLabels) |
: DateTimeSymbolicFieldElement(document, fieldOwner, ampmLabels, 0, 1) |
{ |
} |
-PassRefPtr<DateTimeAMPMFieldElement> DateTimeAMPMFieldElement::create(Document* document, FieldOwner& fieldOwner, const Vector<String>& ampmLabels) |
+PassRefPtr<DateTimeAMPMFieldElement> DateTimeAMPMFieldElement::create(Document& document, FieldOwner& fieldOwner, const Vector<String>& ampmLabels) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, ampmPsuedoId, ("-webkit-datetime-edit-ampm-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeAMPMFieldElement> field = adoptRef(new DateTimeAMPMFieldElement(document, fieldOwner, ampmLabels)); |
@@ -71,12 +71,12 @@ void DateTimeAMPMFieldElement::setValueAsDateTimeFieldsState(const DateTimeField |
// ---------------------------- |
-DateTimeDayFieldElement::DateTimeDayFieldElement(Document* document, FieldOwner& fieldOwner, const String& placeholder, const Range& range) |
+DateTimeDayFieldElement::DateTimeDayFieldElement(Document& document, FieldOwner& fieldOwner, const String& placeholder, const Range& range) |
: DateTimeNumericFieldElement(document, fieldOwner, range, Range(1, 31), placeholder) |
{ |
} |
-PassRefPtr<DateTimeDayFieldElement> DateTimeDayFieldElement::create(Document* document, FieldOwner& fieldOwner, const String& placeholder, const Range& range) |
+PassRefPtr<DateTimeDayFieldElement> DateTimeDayFieldElement::create(Document& document, FieldOwner& fieldOwner, const String& placeholder, const Range& range) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, dayPsuedoId, ("-webkit-datetime-edit-day-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeDayFieldElement> field = adoptRef(new DateTimeDayFieldElement(document, fieldOwner, placeholder.isEmpty() ? "--" : placeholder, range)); |
@@ -112,7 +112,7 @@ void DateTimeDayFieldElement::setValueAsDateTimeFieldsState(const DateTimeFields |
// ---------------------------- |
-DateTimeHourFieldElementBase::DateTimeHourFieldElementBase(Document* document, FieldOwner& fieldOwner, const Range& range, const Range& hardLimits, const Step& step) |
+DateTimeHourFieldElementBase::DateTimeHourFieldElementBase(Document& document, FieldOwner& fieldOwner, const Range& range, const Range& hardLimits, const Step& step) |
: DateTimeNumericFieldElement(document, fieldOwner, range, hardLimits, "--", step) |
{ |
} |
@@ -147,12 +147,12 @@ void DateTimeHourFieldElementBase::setValueAsDateTimeFieldsState(const DateTimeF |
} |
// ---------------------------- |
-DateTimeHour11FieldElement::DateTimeHour11FieldElement(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+DateTimeHour11FieldElement::DateTimeHour11FieldElement(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
: DateTimeHourFieldElementBase(document, fieldOwner, range, Range(0, 11), step) |
{ |
} |
-PassRefPtr<DateTimeHour11FieldElement> DateTimeHour11FieldElement::create(Document* document, FieldOwner& fieldOwner, const Range& hour23Range, const Step& step) |
+PassRefPtr<DateTimeHour11FieldElement> DateTimeHour11FieldElement::create(Document& document, FieldOwner& fieldOwner, const Range& hour23Range, const Step& step) |
{ |
ASSERT(hour23Range.minimum >= 0); |
ASSERT(hour23Range.maximum <= 23); |
@@ -188,12 +188,12 @@ void DateTimeHour11FieldElement::setValueAsInteger(int value, EventBehavior even |
// ---------------------------- |
-DateTimeHour12FieldElement::DateTimeHour12FieldElement(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+DateTimeHour12FieldElement::DateTimeHour12FieldElement(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
: DateTimeHourFieldElementBase(document, fieldOwner, range, Range(1, 12), step) |
{ |
} |
-PassRefPtr<DateTimeHour12FieldElement> DateTimeHour12FieldElement::create(Document* document, FieldOwner& fieldOwner, const Range& hour23Range, const Step& step) |
+PassRefPtr<DateTimeHour12FieldElement> DateTimeHour12FieldElement::create(Document& document, FieldOwner& fieldOwner, const Range& hour23Range, const Step& step) |
{ |
ASSERT(hour23Range.minimum >= 0); |
ASSERT(hour23Range.maximum <= 23); |
@@ -231,12 +231,12 @@ void DateTimeHour12FieldElement::setValueAsInteger(int value, EventBehavior even |
// ---------------------------- |
-DateTimeHour23FieldElement::DateTimeHour23FieldElement(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+DateTimeHour23FieldElement::DateTimeHour23FieldElement(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
: DateTimeHourFieldElementBase(document, fieldOwner, range, Range(0, 23), step) |
{ |
} |
-PassRefPtr<DateTimeHour23FieldElement> DateTimeHour23FieldElement::create(Document* document, FieldOwner& fieldOwner, const Range& hour23Range, const Step& step) |
+PassRefPtr<DateTimeHour23FieldElement> DateTimeHour23FieldElement::create(Document& document, FieldOwner& fieldOwner, const Range& hour23Range, const Step& step) |
{ |
ASSERT(hour23Range.minimum >= 0); |
ASSERT(hour23Range.maximum <= 23); |
@@ -267,12 +267,12 @@ void DateTimeHour23FieldElement::setValueAsInteger(int value, EventBehavior even |
// ---------------------------- |
-DateTimeHour24FieldElement::DateTimeHour24FieldElement(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+DateTimeHour24FieldElement::DateTimeHour24FieldElement(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
: DateTimeHourFieldElementBase(document, fieldOwner, range, Range(1, 24), step) |
{ |
} |
-PassRefPtr<DateTimeHour24FieldElement> DateTimeHour24FieldElement::create(Document* document, FieldOwner& fieldOwner, const Range& hour23Range, const Step& step) |
+PassRefPtr<DateTimeHour24FieldElement> DateTimeHour24FieldElement::create(Document& document, FieldOwner& fieldOwner, const Range& hour23Range, const Step& step) |
{ |
ASSERT(hour23Range.minimum >= 0); |
ASSERT(hour23Range.maximum <= 23); |
@@ -314,12 +314,12 @@ void DateTimeHour24FieldElement::setValueAsInteger(int value, EventBehavior even |
// ---------------------------- |
-DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
: DateTimeNumericFieldElement(document, fieldOwner, range, Range(0, 999), "---", step) |
{ |
} |
-PassRefPtr<DateTimeMillisecondFieldElement> DateTimeMillisecondFieldElement::create(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+PassRefPtr<DateTimeMillisecondFieldElement> DateTimeMillisecondFieldElement::create(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, millisecondPsuedoId, ("-webkit-datetime-edit-millisecond-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeMillisecondFieldElement> field = adoptRef(new DateTimeMillisecondFieldElement(document, fieldOwner, range, step)); |
@@ -355,12 +355,12 @@ void DateTimeMillisecondFieldElement::setValueAsDateTimeFieldsState(const DateTi |
// ---------------------------- |
-DateTimeMinuteFieldElement::DateTimeMinuteFieldElement(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+DateTimeMinuteFieldElement::DateTimeMinuteFieldElement(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
: DateTimeNumericFieldElement(document, fieldOwner, range, Range(0, 59), "--", step) |
{ |
} |
-PassRefPtr<DateTimeMinuteFieldElement> DateTimeMinuteFieldElement::create(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+PassRefPtr<DateTimeMinuteFieldElement> DateTimeMinuteFieldElement::create(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, minutePsuedoId, ("-webkit-datetime-edit-minute-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeMinuteFieldElement> field = adoptRef(new DateTimeMinuteFieldElement(document, fieldOwner, range, step)); |
@@ -396,12 +396,12 @@ void DateTimeMinuteFieldElement::setValueAsDateTimeFieldsState(const DateTimeFie |
// ---------------------------- |
-DateTimeMonthFieldElement::DateTimeMonthFieldElement(Document* document, FieldOwner& fieldOwner, const String& placeholder, const Range& range) |
+DateTimeMonthFieldElement::DateTimeMonthFieldElement(Document& document, FieldOwner& fieldOwner, const String& placeholder, const Range& range) |
: DateTimeNumericFieldElement(document, fieldOwner, range, Range(1, 12), placeholder) |
{ |
} |
-PassRefPtr<DateTimeMonthFieldElement> DateTimeMonthFieldElement::create(Document* document, FieldOwner& fieldOwner, const String& placeholder, const Range& range) |
+PassRefPtr<DateTimeMonthFieldElement> DateTimeMonthFieldElement::create(Document& document, FieldOwner& fieldOwner, const String& placeholder, const Range& range) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, monthPsuedoId, ("-webkit-datetime-edit-month-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeMonthFieldElement> field = adoptRef(new DateTimeMonthFieldElement(document, fieldOwner, placeholder.isEmpty() ? "--" : placeholder, range)); |
@@ -437,12 +437,12 @@ void DateTimeMonthFieldElement::setValueAsDateTimeFieldsState(const DateTimeFiel |
// ---------------------------- |
-DateTimeSecondFieldElement::DateTimeSecondFieldElement(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+DateTimeSecondFieldElement::DateTimeSecondFieldElement(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
: DateTimeNumericFieldElement(document, fieldOwner, range, Range(0, 59), "--", step) |
{ |
} |
-PassRefPtr<DateTimeSecondFieldElement> DateTimeSecondFieldElement::create(Document* document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
+PassRefPtr<DateTimeSecondFieldElement> DateTimeSecondFieldElement::create(Document& document, FieldOwner& fieldOwner, const Range& range, const Step& step) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, secondPsuedoId, ("-webkit-datetime-edit-second-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeSecondFieldElement> field = adoptRef(new DateTimeSecondFieldElement(document, fieldOwner, range, step)); |
@@ -478,12 +478,12 @@ void DateTimeSecondFieldElement::setValueAsDateTimeFieldsState(const DateTimeFie |
// ---------------------------- |
-DateTimeSymbolicMonthFieldElement::DateTimeSymbolicMonthFieldElement(Document* document, FieldOwner& fieldOwner, const Vector<String>& labels, int minimum, int maximum) |
+DateTimeSymbolicMonthFieldElement::DateTimeSymbolicMonthFieldElement(Document& document, FieldOwner& fieldOwner, const Vector<String>& labels, int minimum, int maximum) |
: DateTimeSymbolicFieldElement(document, fieldOwner, labels, minimum, maximum) |
{ |
} |
-PassRefPtr<DateTimeSymbolicMonthFieldElement> DateTimeSymbolicMonthFieldElement::create(Document* document, FieldOwner& fieldOwner, const Vector<String>& labels, int minimum, int maximum) |
+PassRefPtr<DateTimeSymbolicMonthFieldElement> DateTimeSymbolicMonthFieldElement::create(Document& document, FieldOwner& fieldOwner, const Vector<String>& labels, int minimum, int maximum) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, monthPsuedoId, ("-webkit-datetime-edit-month-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeSymbolicMonthFieldElement> field = adoptRef(new DateTimeSymbolicMonthFieldElement(document, fieldOwner, labels, minimum, maximum)); |
@@ -522,12 +522,12 @@ void DateTimeSymbolicMonthFieldElement::setValueAsDateTimeFieldsState(const Date |
// ---------------------------- |
-DateTimeWeekFieldElement::DateTimeWeekFieldElement(Document* document, FieldOwner& fieldOwner, const Range& range) |
+DateTimeWeekFieldElement::DateTimeWeekFieldElement(Document& document, FieldOwner& fieldOwner, const Range& range) |
: DateTimeNumericFieldElement(document, fieldOwner, range, Range(DateComponents::minimumWeekNumber, DateComponents::maximumWeekNumber), "--") |
{ |
} |
-PassRefPtr<DateTimeWeekFieldElement> DateTimeWeekFieldElement::create(Document* document, FieldOwner& fieldOwner, const Range& range) |
+PassRefPtr<DateTimeWeekFieldElement> DateTimeWeekFieldElement::create(Document& document, FieldOwner& fieldOwner, const Range& range) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, weekPsuedoId, ("-webkit-datetime-edit-week-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeWeekFieldElement> field = adoptRef(new DateTimeWeekFieldElement(document, fieldOwner, range)); |
@@ -563,7 +563,7 @@ void DateTimeWeekFieldElement::setValueAsDateTimeFieldsState(const DateTimeField |
// ---------------------------- |
-DateTimeYearFieldElement::DateTimeYearFieldElement(Document* document, FieldOwner& fieldOwner, const DateTimeYearFieldElement::Parameters& parameters) |
+DateTimeYearFieldElement::DateTimeYearFieldElement(Document& document, FieldOwner& fieldOwner, const DateTimeYearFieldElement::Parameters& parameters) |
: DateTimeNumericFieldElement(document, fieldOwner, Range(parameters.minimumYear, parameters.maximumYear), Range(DateComponents::minimumYear(), DateComponents::maximumYear()), parameters.placeholder.isEmpty() ? "----" : parameters.placeholder) |
, m_minIsSpecified(parameters.minIsSpecified) |
, m_maxIsSpecified(parameters.maxIsSpecified) |
@@ -572,7 +572,7 @@ DateTimeYearFieldElement::DateTimeYearFieldElement(Document* document, FieldOwne |
ASSERT(parameters.maximumYear <= DateComponents::maximumYear()); |
} |
-PassRefPtr<DateTimeYearFieldElement> DateTimeYearFieldElement::create(Document* document, FieldOwner& fieldOwner, const DateTimeYearFieldElement::Parameters& parameters) |
+PassRefPtr<DateTimeYearFieldElement> DateTimeYearFieldElement::create(Document& document, FieldOwner& fieldOwner, const DateTimeYearFieldElement::Parameters& parameters) |
{ |
DEFINE_STATIC_LOCAL(AtomicString, yearPsuedoId, ("-webkit-datetime-edit-year-field", AtomicString::ConstructFromLiteral)); |
RefPtr<DateTimeYearFieldElement> field = adoptRef(new DateTimeYearFieldElement(document, fieldOwner, parameters)); |