-
yosin@chromium.org authored
REGRESSION(r109729): The optgroup element's "disabled" attribute has no effect to rendering and selection https://bugs.webkit.org/show_bug.cgi?id=87614 Reviewed by Kent Tamura. Source/WebCore: This patch adds HTMLOptGroupElement::disabled and isEnabledFormControl methods which was implemented in HTMLFormControlElement at r109729 and updates CSS pseudo class checker to check "optgroup" element. Tests: fast/forms/select/optgroup-clicking.html fast/forms/select/optgroup-disabled.html fast/forms/select/optgroup-rendering.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): On disabled and enabled pseudo class checker. We checked tag name "optgroup" in addition isFormControlElement. * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): Checks optgroup.disabled. * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::disabled): Added. * html/HTMLOptGroupElement.h: (HTMLOptGroupElement): Added isEnabledFormControl. LayoutTests: Note: An image for optgroup-rendering.html will be change due by BUG-87719. Color of option elements should be blue (:enabled pseudo class) instead of green. * fast/forms/select/optgroup-clicking-expected.txt: Added. * fast/forms/select/optgroup-clicking.html: Added. * fast/forms/select/optgroup-disabled-expected.txt: Added. * fast/forms/select/optgroup-disabled.html: Added. * fast/forms/select/optgroup-rendering.html: Added. * platform/chromium/test_expectations.txt: Add MISSING entry for optgroup-rendering.html. * platform/chromium-linux/fast/forms/select/optgroup-rendering-expected.png: Added. * platform/chromium-linux/fast/forms/select/optgroup-rendering-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9301b766