Date.UTC can't set an year earlier than 1900. So when the input has a value earlier than 1900, calendar picker shows the wrong date.
Created attachment 158561 [details] Patch
Comment on attachment 158561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=158561&action=review > Source/WebCore/ChangeLog:8 > + Date.UTC can't set an year earlier than 1900. So when the input has a value earlier than 1900, calendar picker shows the wrong date. Date.UTC() seems to work expectedly if year >= 100, not 1900.
Created attachment 158688 [details] Patch
Comment on attachment 158688 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=158688&action=review > LayoutTests/ChangeLog:10 > + * platform/chromium-mac/fast/forms/date/calendar-picker-appearance-pre-100-expected.png: Added. Adding a pixel test for this issue is not reasonable. Can we make this a dumpAsText test? I think the test code can access JavaScript code in a page popup. > LayoutTests/fast/forms/date/calendar-picker-appearance-pre-100.html:16 > +console.log('Check if year before 1900 can be set.'); 1900 -> 100
Created attachment 158783 [details] Patch
Comment on attachment 158783 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=158783&action=review > LayoutTests/fast/forms/date/calendar-picker-appearance-pre-100-expected.txt:9 > +TEST COMPLETE > +PASS document.getElementById("date").value is "0002-02-03" "TEST COMPLETE" followed by the PASS looks wrong. You need to use jsTestIsAsync=true & finishJSTest() if you use js-test-post.js, or need to remove js-test-post.js. > LayoutTests/platform/chromium/TestExpectations:2494 > +BUGWK92710 : fast/forms/date/calendar-picker-appearance-pre-100.html = IMAGE PASS We don't need it.
Created attachment 159092 [details] Patch
Comment on attachment 159092 [details] Patch Clearing flags on attachment: 159092 Committed r125962: <http://trac.webkit.org/changeset/125962>
All reviewed patches have been landed. Closing bug.