[webkit-reviews] review granted: [Bug 27452] Support for the checkValidity() method and the invalid event : [Attachment 38408] Patch v1b

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 21 16:22:18 PDT 2009


Adele Peterson <adele at apple.com> has granted Michelangelo De Simone
<micdesim at gmail.com>'s request for review:
Bug 27452: Support for the checkValidity() method and the invalid event
https://bugs.webkit.org/show_bug.cgi?id=27452

Attachment 38408: Patch v1b
https://bugs.webkit.org/attachment.cgi?id=38408&action=review

------- Additional Comments from Adele Peterson <adele at apple.com>
You can return false early if !control->checkValidity().  Everything else looks
good. r=me

> +bool HTMLFormElement::checkValidity()
> +{
> +    // TODO: Check for unhandled invalid controls, see #27452 for tips.
> +
> +    bool hasOnlyValidControls = true;
> +    for (unsigned i = 0; i < formElements.size(); ++i) {
> +	   HTMLFormControlElement* control = formElements[i];
> +	   if (!control->checkValidity())
> +	       hasOnlyValidControls = false;
> +    }
> +
> +    return hasOnlyValidControls;
> +}
> +


More information about the webkit-reviews mailing list