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.
Pseudo class :valid and :invalid are defined in http://www.whatwg.org/specs/web-apps/current-work/multipage/selectors.html#pseudo-classes
*** Bug 81487 has been marked as a duplicate of this bug. ***
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>
Created attachment 133425 [details] Patch 1
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>.
Created attachment 133430 [details] Patch 2
Comment on attachment 133430 [details] Patch 2 ok
Comment on attachment 133430 [details] Patch 2 Clearing flags on attachment: 133430 Committed r111830: <http://trac.webkit.org/changeset/111830>
All reviewed patches have been landed. Closing bug.