RESOLVED FIXED 43973
<input type=number> should not have an invalid number as its value
https://bugs.webkit.org/show_bug.cgi?id=43973
Summary <input type=number> should not have an invalid number as its value
Kent Tamura
Reported 2010-08-13 08:17:20 PDT
Making <input type=number> conformable to the current HTML5 spec. Discussed at http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-August/027896.html
Attachments
Patch (18.41 KB, patch)
2010-08-13 08:35 PDT, Kent Tamura
no flags
Patch 2 (rebased) (18.10 KB, patch)
2010-08-30 02:11 PDT, Kent Tamura
no flags
Patch 3 (17.63 KB, patch)
2010-09-02 03:01 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2010-08-13 08:35:14 PDT
Kent Tamura
Comment 2 2010-08-30 02:11:35 PDT
Created attachment 65892 [details] Patch 2 (rebased)
Dimitri Glazkov (Google)
Comment 3 2010-09-01 09:22:00 PDT
Comment on attachment 65892 [details] Patch 2 (rebased) View in context: https://bugs.webkit.org/attachment.cgi?id=65892&action=prettypatch > WebCore/dom/InputElement.h:64 > + virtual bool isCommittableValue(const String&) const = 0; How about isAcceptableValue? Committable seems unclear. > WebCore/rendering/RenderTextControlSingleLine.cpp:681 > + else if (!node()->isHTMLElement() || !static_cast<HTMLInputElement*>(node())->formControlValueMatchesRenderer()) What does this check mean?
Kent Tamura
Comment 4 2010-09-02 03:01:36 PDT
Created attachment 66343 [details] Patch 3
Kent Tamura
Comment 5 2010-09-02 03:03:48 PDT
Thank you for reviewing! (In reply to comment #3) > > WebCore/dom/InputElement.h:64 > > + virtual bool isCommittableValue(const String&) const = 0; > How about isAcceptableValue? Committable seems unclear. Done. > > WebCore/rendering/RenderTextControlSingleLine.cpp:681 > > + else if (!node()->isHTMLElement() || !static_cast<HTMLInputElement*>(node())->formControlValueMatchesRenderer()) > What does this check mean? Good catch. This was experimental code for localized numbers and is not needed at this moment. I removed it.
Dimitri Glazkov (Google)
Comment 6 2010-09-02 07:29:06 PDT
Comment on attachment 66343 [details] Patch 3 yay, team!
Kent Tamura
Comment 7 2010-09-09 21:49:19 PDT
Comment on attachment 66343 [details] Patch 3 Clearing flags on attachment: 66343 Committed r67164: <http://trac.webkit.org/changeset/67164>
Kent Tamura
Comment 8 2010-09-09 21:49:28 PDT
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.