[Webkit-unassigned] [Bug 60871] HTML5 Number Spinbox displays a 0 in situations where a 0 is not between the min and max.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 16 02:58:09 PDT 2011


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


Kent Tamura <tkent at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #93620|review?                     |review-
               Flag|                            |




--- Comment #8 from Kent Tamura <tkent at chromium.org>  2011-05-16 02:58:09 PST ---
(From update of attachment 93620)
View in context: https://bugs.webkit.org/attachment.cgi?id=93620&action=review

> LayoutTests/fast/forms/numeric-input-spin.html:48
> +//     - The value should be the minimum value for both keyDown and keyUp.

Don't call them keydown / keyup.  Keydown and keyup are the names of DOM events.

> Source/WebCore/html/HTMLInputElement.cpp:1466
> +        int nextDiff = step * n;
> +        if (current < m_inputType->minimum() - nextDiff)
> +            current = m_inputType->minimum() - nextDiff;

This looks tricky.  But I understand you want to use the following step-rounding and the event dispatching.  So I think this is acceptable.

> Source/WebCore/html/HTMLInputElement.cpp:1475
> -        if (stepMismatch(currentStringValue)) {
> +        if (stepMismatch(value())) {

Instead of this change, we had better do currentStringValue=value() just after setValueAsNumber().
Anyway, this also fixes another bug http://crbug.com/76046 , right?

-- 
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