Index: Source/WebCore/css/SelectorChecker.cpp |
=================================================================== |
--- Source/WebCore/css/SelectorChecker.cpp (revision 119185) |
+++ Source/WebCore/css/SelectorChecker.cpp (working copy) |
@@ -1043,7 +1043,7 @@ |
} |
break; |
case CSSSelector::PseudoEnabled: |
- if (element && element->isFormControlElement()) |
+ if (element && (element->isFormControlElement() || element->hasTagName(optgroupTag))) |
return element->isEnabledFormControl(); |
break; |
case CSSSelector::PseudoFullPageMedia: |
@@ -1052,7 +1052,7 @@ |
case CSSSelector::PseudoDefault: |
return element && element->isDefaultButtonForForm(); |
case CSSSelector::PseudoDisabled: |
- if (element && (element->isFormControlElement() || element->hasTagName(optionTag))) |
+ if (element && (element->isFormControlElement() || element->hasTagName(optionTag) || element->hasTagName(optgroupTag))) |
return !element->isEnabledFormControl(); |
break; |
case CSSSelector::PseudoReadOnly: |