DateTimeYearFieldElement should respect min/max values specified by page authors.
Created attachment 166819 [details] Patch
Comment on attachment 166819 [details] Patch Attachment 166819 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/14125690 New failing tests: fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes.html fast/forms/week-multiple-fields/week-multiple-fields-appearance-basic.html fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-classes.html fast/forms/week-multiple-fields/week-multiple-fields-appearance-style.html fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements.html
Comment on attachment 166819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166819&action=review > Source/WebCore/html/shadow/DateTimeFieldElements.cpp:456 > + return range().isInRange(fullYear) ? fullYear : DateTimeNumericFieldElement::defaultValueForStepDown(); In current UI document, we use current year if we author doesn't specify "min" attribute, otherwise we use minimum value. If you think using current year if it is in-range is better, please update UI document.
(In reply to comment #3) > In current UI document, we use current year if we author doesn't specify "min" attribute, otherwise we use minimum value. > If you think using current year if it is in-range is better, please update UI document. I see. I'll update the implementation.
Created attachment 166854 [details] Patch 2
Comment on attachment 166854 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=166854&action=review > Source/WebCore/html/shadow/DateTimeEditElement.cpp:164 > + yearParams.minIsSpecified = false; Nit: could be yearParams.minIsSpecified = m_parameters.minimumYear != m_parameters.undefinedYear(); > Source/WebCore/html/shadow/DateTimeFieldElements.h:177 > + : minimumYear(-1) Why not use undefinedYear()?
Comment on attachment 166854 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=166854&action=review >> Source/WebCore/html/shadow/DateTimeFieldElements.h:177 >> + : minimumYear(-1) > > Why not use undefinedYear()? Because we'd like to avoid dependency from DateTime*FieldElement to DateTimeEditElement
Comment on attachment 166854 [details] Patch 2 Rejecting attachment 166854 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: /WebCore/html/shadow/DateTimeNumericFieldElement.h patching file LayoutTests/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events-expected.txt patching file LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events.html Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Hajime Mor..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue Full output: http://queues.webkit.org/results/14129925
Committed r130362: <http://trac.webkit.org/changeset/130362>