RESOLVED FIXED 62668
Webkit allows disabled option as value of "required" select
https://bugs.webkit.org/show_bug.cgi?id=62668
Summary Webkit allows disabled option as value of "required" select
Rafał Miłecki
Reported 2011-06-14 15:35:18 PDT
"required" attribute tells browser value has to be entered for a given input/select. AFAIK choosing disabled option with no value should generate form validation error.
Attachments
Testcase for the bug (590 bytes, text/html)
2011-06-14 15:35 PDT, Rafał Miłecki
no flags
Patch (3.72 KB, patch)
2011-06-15 23:58 PDT, Dai Mikurube
no flags
Rafał Miłecki
Comment 1 2011-06-14 15:35:55 PDT
Created attachment 97175 [details] Testcase for the bug
Kent Tamura
Comment 2 2011-06-15 17:12:12 PDT
HTMLSelectElement::hasPlaceHolderLabelOption() checks option->disabled(), but the current specification doesn't ask to check 'disabled' for placeholder label option. I don't remember why we added the option->disabled() check. The specification might have been updated.
Dai Mikurube
Comment 3 2011-06-15 23:22:34 PDT
Yes, the specification looks like updated. http://www.w3.org/TR/2010/WD-html5-20101019/the-button-element.html#placeholder-label-option says: > If a ... is the empty string, and that option is not disabled, and, finally, that option element's parent node .... http://www.w3.org/TR/2011/WD-html5-20110525/the-button-element.html#placeholder-label-option says: > If a ... is the empty string, and that option element's parent node .... I'll try fixing it.
Dai Mikurube
Comment 4 2011-06-15 23:58:46 PDT
Dai Mikurube
Comment 5 2011-06-16 00:03:51 PDT
Ah, I uploaded the patch from dmikurube@google.com. It's me, dmikurube@chromium.org.
Kent Tamura
Comment 6 2011-06-20 19:20:12 PDT
Comment on attachment 97409 [details] Patch ok
WebKit Review Bot
Comment 7 2011-06-20 20:00:28 PDT
Comment on attachment 97409 [details] Patch Clearing flags on attachment: 97409 Committed r89332: <http://trac.webkit.org/changeset/89332>
WebKit Review Bot
Comment 8 2011-06-20 20:00:33 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.