Bug 43973 - <input type=number> should not have an invalid number as its value
Summary: <input type=number> should not have an invalid number as its value
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks: 37024 42484 45376
  Show dependency treegraph
 
Reported: 2010-08-13 08:17 PDT by Kent Tamura
Modified: 2010-09-09 21:49 PDT (History)
3 users (show)

See Also:


Attachments
Patch (18.41 KB, patch)
2010-08-13 08:35 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (rebased) (18.10 KB, patch)
2010-08-30 02:11 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 3 (17.63 KB, patch)
2010-09-02 03:01 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 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
Comment 1 Kent Tamura 2010-08-13 08:35:14 PDT
Created attachment 64346 [details]
Patch
Comment 2 Kent Tamura 2010-08-30 02:11:35 PDT
Created attachment 65892 [details]
Patch 2 (rebased)
Comment 3 Dimitri Glazkov (Google) 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?
Comment 4 Kent Tamura 2010-09-02 03:01:36 PDT
Created attachment 66343 [details]
Patch 3
Comment 5 Kent Tamura 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.
Comment 6 Dimitri Glazkov (Google) 2010-09-02 07:29:06 PDT
Comment on attachment 66343 [details]
Patch 3

yay, team!
Comment 7 Kent Tamura 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>
Comment 8 Kent Tamura 2010-09-09 21:49:28 PDT
All reviewed patches have been landed.  Closing bug.