[Webkit-unassigned] [Bug 45491] when empty, clicking "down" on outer-spin-button returns "max value"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 25 18:27:10 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=45491





--- Comment #24 from Kent Tamura <tkent at chromium.org>  2010-11-25 18:27:10 PST ---
(From update of attachment 74839)
View in context: https://bugs.webkit.org/attachment.cgi?id=74839&action=review

>>> LayoutTests/fast/forms/script-tests/input-stepup-stepdown-from-renderer.js:101
>>> +shouldBe('stepDown("2010-02-10", "3.40282346e+38", null)', '"275760-09-13"');
>> 
>> These results look very strange.  Are they expected?
> 
> No "max" is given, so it results in the maximum number (date) for type=date under 3.40282346e+38.
> 
> The maximum number is defined in WebCore/html/DateComponent.h :
> WebCore/html/DateComponents.h:    static inline double maximumDate() { return 8640000000000000.0; } // 275760-09-13T00:00Z
> WebCore/html/DateComponents.h:    static inline double maximumMonth() { return (275760 - 1970) * 12.0 + 9 - 1; } // 275760-09
> WebCore/html/DateComponents.h:    static inline double maximumWeek() { return 8639999568000000.0; } // 275760-09-08, the Monday of the week including 275760-09-13.
> 
> 1970-01-01 comes from the internal representation. The date is represented by 0. In this tag, the step-base is 0. So it resulted in 1970-01-01. It may be unnatural.

Why does 2010-02-10 + huge step become 1970-01-01, which is less than the initial value?
Why does 2010-02-10 - huge step become 275769-09-13, which is larger than the initial value?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list