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

Unified Diff: Source/WebCore/html/shadow/DateTimeFieldElements.cpp

Issue 11420032: Merge 134239 - Refactoring: set read-only values on layout in DateTimeEditElement (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 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/WebCore/html/shadow/DateTimeFieldElements.cpp
===================================================================
--- Source/WebCore/html/shadow/DateTimeFieldElements.cpp (revision 134890)
+++ Source/WebCore/html/shadow/DateTimeFieldElements.cpp (working copy)
@@ -61,12 +61,12 @@
setValueAsInteger(date.hour() >= 12 ? 1 : 0);
}
-void DateTimeAMPMFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeAMPMFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (dateTimeFieldsState.hasAMPM())
setValueAsInteger(dateTimeFieldsState.ampm());
else
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
}
// ----------------------------
@@ -94,10 +94,10 @@
setValueAsInteger(date.monthDay());
}
-void DateTimeDayFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeDayFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasDayOfMonth()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -107,7 +107,7 @@
return;
}
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
}
// ----------------------------
@@ -166,17 +166,17 @@
setValueAsInteger(date.hour());
}
-void DateTimeHourFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeHourFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasHour()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
const int hour12 = dateTimeFieldsState.hour();
if (hour12 < 1 || hour12 > 12) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -240,16 +240,16 @@
setValueAsInteger(date.millisecond());
}
-void DateTimeMillisecondFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeMillisecondFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasMillisecond()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
const unsigned value = dateTimeFieldsState.millisecond();
if (value > static_cast<unsigned>(maximum())) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -281,16 +281,16 @@
setValueAsInteger(date.minute());
}
-void DateTimeMinuteFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeMinuteFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasMinute()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
const unsigned value = dateTimeFieldsState.minute();
if (value > static_cast<unsigned>(maximum())) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -322,10 +322,10 @@
setValueAsInteger(date.month() + 1);
}
-void DateTimeMonthFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeMonthFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasMonth()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -335,7 +335,7 @@
return;
}
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
}
// ----------------------------
@@ -363,16 +363,16 @@
setValueAsInteger(date.second());
}
-void DateTimeSecondFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeSecondFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasSecond()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
const unsigned value = dateTimeFieldsState.second();
if (value > static_cast<unsigned>(maximum())) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -407,16 +407,16 @@
setValueAsInteger(date.month());
}
-void DateTimeSymbolicMonthFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeSymbolicMonthFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasMonth()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
const unsigned value = dateTimeFieldsState.month() - 1;
if (value >= symbolsSize()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -448,10 +448,10 @@
setValueAsInteger(date.week());
}
-void DateTimeWeekFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeWeekFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasWeekOfYear()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -461,7 +461,7 @@
return;
}
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
}
// ----------------------------
@@ -521,10 +521,10 @@
setValueAsInteger(date.fullYear());
}
-void DateTimeYearFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
+void DateTimeYearFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState)
{
if (!dateTimeFieldsState.hasYear()) {
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
return;
}
@@ -534,7 +534,7 @@
return;
}
- setEmptyValue(dateForReadOnlyField);
+ setEmptyValue();
}
} // namespace WebCore
« no previous file with comments | « Source/WebCore/html/shadow/DateTimeFieldElements.h ('k') | Source/WebCore/html/shadow/DateTimeNumericFieldElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698