[Webkit-unassigned] [Bug 28934] Add <input type=number> validation support
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 3 01:21:51 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28934
Eric Seidel <eric at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #38969|review? |review-
Flag| |
--- Comment #2 from Eric Seidel <eric at webkit.org> 2009-09-03 01:21:51 PDT ---
(From update of attachment 38969)
It seems stringToFloat should have HTML5 in teh name. It's not a generic
function, but rather a specific html5-compatible implementation.
html5CompatStringToFloat
html5SpecStingToFloat
?
This would be better as a single if unless there is a grand plan to add a bunch
more types...
+ switch (input->inputType()) {
+ case HTMLInputElement::NUMBER:
+ return !HTMLInputElement::stringToFloat(value, 0);
+ default:
+ return false;
+ }
if (input->type() != HTMLInputElement::NUMBER)
return false;
// Check to make sure the number is valid, ignore the parsed number.
return !HTMLInputElement::stringToFloat(value, 0);
Otherwise looks fine.
--
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