Bug 34209 - rangeOverflow/rangeUnderflow support for type=date
Summary: rangeOverflow/rangeUnderflow support for type=date
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.whatwg.org/specs/web-apps/...
Keywords:
Depends on:
Blocks: 29070
  Show dependency treegraph
 
Reported: 2010-01-27 02:44 PST by Kent Tamura
Modified: 2010-01-27 23:33 PST (History)
0 users

See Also:


Attachments
Proposed patch (18.96 KB, patch)
2010-01-27 02:55 PST, Kent Tamura
darin: review+
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-01-27 02:44:53 PST
rangeOverflow/rangeUnderflow flags of ValidityState support for <input type=date>.
Comment 1 Kent Tamura 2010-01-27 02:55:39 PST
Created attachment 47513 [details]
Proposed patch
Comment 2 Darin Adler 2010-01-27 15:47:04 PST
Comment on attachment 47513 [details]
Proposed patch

> +    // Parses the src for the current type, and return the double
> +    // value for the parsing result if the parsing succeeds; Returns
> +    // defaultValue otherwise. This function can return NaN or
> +    // Infinity only if defaultValue is NaN or Infinity.
> +    double doubleValueFor(const String& src, double defaultValue) const;

If you think that the argument name is really needed, then please use the word "source" instead of the abbreviation "src". I think you can omit the argument name.

Might be nicer if this function name made it clearer it was a string parser. I'm not sure "double value for <xxx>" implies parsing.
Comment 3 Kent Tamura 2010-01-27 23:33:30 PST
(In reply to comment #2)
> If you think that the argument name is really needed, then please use the word
> "source" instead of the abbreviation "src". I think you can omit the argument
> name.

I removed "src" and changed the wording.

> Might be nicer if this function name made it clearer it was a string parser.
> I'm not sure "double value for <xxx>" implies parsing.

Renamed to parseToDouble().

Landed as r53975.