RESOLVED FIXED Bug 80088
[Forms][CSS] The option element should not match pseudo class :valid
https://bugs.webkit.org/show_bug.cgi?id=80088
Summary [Forms][CSS] The option element should not match pseudo class :valid
yosin
Reported 2012-03-01 20:11:30 PST
Because of the class HTMLOptionElement inherits HTMLFormControlElement, the option element matches CSS pseudo class :valid. Sample URL shows this bug. List box should contain red color text instead of green color text.
Attachments
Patch 1 (2.29 KB, patch)
2012-03-22 21:29 PDT, yosin
no flags
Patch 2 (2.47 KB, patch)
2012-03-22 22:21 PDT, yosin
no flags
yosin
Comment 1 2012-03-05 20:34:40 PST
yosin
Comment 2 2012-03-18 23:20:21 PDT
*** Bug 81487 has been marked as a duplicate of this bug. ***
yosin
Comment 3 2012-03-19 00:47:41 PDT
The "option" elements match following CSS pseudo classes[1]: 1. enables 2. disabled 3. checked 4. default I'm not sure [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/selectors.html#pseudo-classes == Sample HTML == <head> <style type="text/css"> option:enabled { color: #0000ff; font-size: 30pt; } option:disabled { color: #808080; font-size: 20pt;} option:checked { background: #00ffff; } option:default{ font-style: italic; } </style> </head> <select size="10"> <option id="enabled">enabled #0000ff</option> <option id="disabled" disabled="disabled">disabled #cccccc</option> <option id="checcked">checked #00ffff</option> <option id="default" selected="selected">default #italic</option> </select>
yosin
Comment 4 2012-03-22 21:29:36 PDT
Kent Tamura
Comment 5 2012-03-22 22:13:43 PDT
Comment on attachment 133425 [details] Patch 1 View in context: https://bugs.webkit.org/attachment.cgi?id=133425&action=review > LayoutTests/fast/css/pseudo-valid-007.html:24 > +shouldBeNull('document.querySelector("option:valid")'); This should be added to pseudo-valid-unapplied.html. pseudo-valid-007.html is for <select>.
yosin
Comment 6 2012-03-22 22:21:36 PDT
Kent Tamura
Comment 7 2012-03-22 22:41:07 PDT
Comment on attachment 133430 [details] Patch 2 ok
WebKit Review Bot
Comment 8 2012-03-22 23:11:52 PDT
Comment on attachment 133430 [details] Patch 2 Clearing flags on attachment: 133430 Committed r111830: <http://trac.webkit.org/changeset/111830>
WebKit Review Bot
Comment 9 2012-03-22 23:11:56 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.