RESOLVED FIXED 106416
INPUT_MULTIPLE_FIELDS_UI: Step-up/-down of week field should respect min/max attributes
https://bugs.webkit.org/show_bug.cgi?id=106416
Summary INPUT_MULTIPLE_FIELDS_UI: Step-up/-down of week field should respect min/max ...
Kunihiko Sakamoto
Reported 2013-01-08 22:01:21 PST
Use min/max attributes of <input type=week> to limit values selectable by step-up/down. Related bug (for month/day fields): https://bugs.webkit.org/show_bug.cgi?id=106212
Attachments
Patch (18.85 KB, patch)
2013-01-08 22:07 PST, Kunihiko Sakamoto
no flags
Patch 2 (18.79 KB, patch)
2013-01-08 23:33 PST, Kunihiko Sakamoto
no flags
Patch 3 (18.73 KB, patch)
2013-01-08 23:43 PST, Kunihiko Sakamoto
no flags
Kunihiko Sakamoto
Comment 1 2013-01-08 22:07:20 PST
Kent Tamura
Comment 2 2013-01-08 22:17:07 PST
Comment on attachment 181847 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181847&action=review > LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-readonly-subfield.html:46 > +shouldBeTrue('isReadOnlyField(createWeekInput("2012-W50", "2012-W50", ""), pseudoWeek)'); In this case, what does input.value return?
Kunihiko Sakamoto
Comment 3 2013-01-08 22:55:42 PST
Comment on attachment 181847 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181847&action=review >> LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-readonly-subfield.html:46 >> +shouldBeTrue('isReadOnlyField(createWeekInput("2012-W50", "2012-W50", ""), pseudoWeek)'); > > In this case, what does input.value return? Ah, good point! It returns empty, but user cannot change the value because it's readonly. Perhaps we shouldn't make the field readonly in such case?
Kunihiko Sakamoto
Comment 4 2013-01-08 23:33:45 PST
Kunihiko Sakamoto
Comment 5 2013-01-08 23:36:53 PST
Updated patch that not make week field readonly. In the case of value="" min="2012-W50" max="2012-W50", initial value of week field is now blank.
Kent Tamura
Comment 6 2013-01-08 23:39:11 PST
Comment on attachment 181856 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=181856&action=review > Source/WebCore/html/shadow/DateTimeEditElement.cpp:261 > + RefPtr<DateTimeFieldElement> field = DateTimeWeekFieldElement::create(document, m_editElement, minWeek, maxWeek); > + m_editElement.addField(field); The variable 'field' is unnecessary.
Kunihiko Sakamoto
Comment 7 2013-01-08 23:43:14 PST
Kunihiko Sakamoto
Comment 8 2013-01-08 23:43:51 PST
Comment on attachment 181856 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=181856&action=review >> Source/WebCore/html/shadow/DateTimeEditElement.cpp:261 >> + m_editElement.addField(field); > > The variable 'field' is unnecessary. Done.
Kent Tamura
Comment 9 2013-01-08 23:50:37 PST
Comment on attachment 181859 [details] Patch 3 ok
WebKit Review Bot
Comment 10 2013-01-09 00:54:23 PST
Comment on attachment 181859 [details] Patch 3 Clearing flags on attachment: 181859 Committed r139172: <http://trac.webkit.org/changeset/139172>
WebKit Review Bot
Comment 11 2013-01-09 00:54:27 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.