Commit e9ae0aff authored by tkent@chromium.org's avatar tkent@chromium.org
Browse files

Fix assertion failures on Chromium Debug bots for datetime/datetime-local input types.

* html/shadow/DateTimeFieldElements.cpp:
If a placeholder stirng is empty, use a sequence of "-".
(WebCore::DateTimeDayFieldElement::create):
(WebCore::DateTimeMonthFieldElement::create):
(WebCore::DateTimeYearFieldElement::create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent da910aae
2012-10-02 Kent Tamura <tkent@chromium.org>
Fix assertion failures on Chromium Debug bots for datetime/datetime-local input types.
* html/shadow/DateTimeFieldElements.cpp:
If a placeholder stirng is empty, use a sequence of "-".
(WebCore::DateTimeDayFieldElement::create):
(WebCore::DateTimeMonthFieldElement::create):
(WebCore::DateTimeYearFieldElement::create):
2012-10-02 MORITA Hajime <morrita@google.com>
https://bugs.webkit.org/show_bug.cgi?id=98134
......
......@@ -79,7 +79,7 @@ DateTimeDayFieldElement::DateTimeDayFieldElement(Document* document, FieldOwner&
PassRefPtr<DateTimeDayFieldElement> DateTimeDayFieldElement::create(Document* document, FieldOwner& fieldOwner, const String& placeholder)
{
DEFINE_STATIC_LOCAL(AtomicString, dayPsuedoId, ("-webkit-datetime-edit-day-field"));
RefPtr<DateTimeDayFieldElement> field = adoptRef(new DateTimeDayFieldElement(document, fieldOwner, placeholder));
RefPtr<DateTimeDayFieldElement> field = adoptRef(new DateTimeDayFieldElement(document, fieldOwner, placeholder.isEmpty() ? ASCIILiteral("--") : placeholder));
field->initialize(dayPsuedoId, AXDayOfMonthFieldText());
return field.release();
}
......@@ -307,7 +307,7 @@ DateTimeMonthFieldElement::DateTimeMonthFieldElement(Document* document, FieldOw
PassRefPtr<DateTimeMonthFieldElement> DateTimeMonthFieldElement::create(Document* document, FieldOwner& fieldOwner, const String& placeholder)
{
DEFINE_STATIC_LOCAL(AtomicString, monthPsuedoId, ("-webkit-datetime-edit-month-field"));
RefPtr<DateTimeMonthFieldElement> field = adoptRef(new DateTimeMonthFieldElement(document, fieldOwner, placeholder));
RefPtr<DateTimeMonthFieldElement> field = adoptRef(new DateTimeMonthFieldElement(document, fieldOwner, placeholder.isEmpty() ? ASCIILiteral("--") : placeholder));
field->initialize(monthPsuedoId, AXMonthFieldText());
return field.release();
}
......@@ -437,7 +437,7 @@ DateTimeYearFieldElement::DateTimeYearFieldElement(Document* document, FieldOwne
PassRefPtr<DateTimeYearFieldElement> DateTimeYearFieldElement::create(Document* document, FieldOwner& fieldOwner, const String& placeholder)
{
DEFINE_STATIC_LOCAL(AtomicString, yearPsuedoId, ("-webkit-datetime-edit-year-field"));
RefPtr<DateTimeYearFieldElement> field = adoptRef(new DateTimeYearFieldElement(document, fieldOwner, placeholder));
RefPtr<DateTimeYearFieldElement> field = adoptRef(new DateTimeYearFieldElement(document, fieldOwner, placeholder.isEmpty() ? ASCIILiteral("----") : placeholder));
field->initialize(yearPsuedoId, AXYearFieldText());
return field.release();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment