[webkit-reviews] review denied: [Bug 28934] Add <input type=number> validation support : [Attachment 38969] Proposed patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 3 01:21:50 PDT 2009
Eric Seidel <eric at webkit.org> has denied TAMURA, Kent <tkent at chromium.org>'s
request for review:
Bug 28934: Add <input type=number> validation support
https://bugs.webkit.org/show_bug.cgi?id=28934
Attachment 38969: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=38969&action=review
------- Additional Comments from Eric Seidel <eric at webkit.org>
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.
More information about the webkit-reviews
mailing list