[webkit-reviews] review granted: [Bug 25551] Support for HTML5 Forms "required" attribute : [Attachment 32975] Proposed patch, rev.5
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 17 15:15:21 PDT 2009
Darin Adler <darin at apple.com> has granted Michelangelo De Simone
<micdesim at gmail.com>'s request for review:
Bug 25551: Support for HTML5 Forms "required" attribute
https://bugs.webkit.org/show_bug.cgi?id=25551
Attachment 32975: Proposed patch, rev.5
https://bugs.webkit.org/attachment.cgi?id=32975&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
> + switch (inputType()) {
> + case TEXT:
> + case SEARCH:
> + case URL:
> + case TELEPHONE:
> + case EMAIL:
> + case PASSWORD:
> + case NUMBER:
> + case FILE:
> + return value().isEmpty();
> + case CHECKBOX:
> + return !checked();
> + case RADIO:
> + return
!document()->checkedRadioButtons().checkedButtonForGroup(name());
> + case HIDDEN:
> + case RANGE:
> + case SUBMIT:
> + case IMAGE:
> + case RESET:
> + case BUTTON:
> + case ISINDEX:
> + ASSERT_NOT_REACHED();
> + }
> +
> + return false;
Could also use an assertion outside the switch statement, since that should not
be reached either. I suggest replacing the ASSERT_NOT_REACHED with a break and
moving the ASSERT_NOT_REACHED outside the switch.
r=me
More information about the webkit-reviews
mailing list