Index: Source/WebCore/css/SelectorChecker.cpp |
=================================================================== |
--- Source/WebCore/css/SelectorChecker.cpp (revision 136089) |
+++ Source/WebCore/css/SelectorChecker.cpp (working copy) |
@@ -1045,13 +1045,9 @@ |
return !element->isEnabledFormControl(); |
break; |
case CSSSelector::PseudoReadOnly: |
- if (!element || !element->isFormControlElement()) |
- return false; |
- return element->isTextFormControl() && element->shouldMatchReadOnlySelector(); |
+ return element && element->shouldMatchReadOnlySelector(); |
case CSSSelector::PseudoReadWrite: |
- if (!element || !element->isFormControlElement()) |
- return false; |
- return element->isTextFormControl() && element->shouldMatchReadWriteSelector(); |
+ return element && element->shouldMatchReadWriteSelector(); |
case CSSSelector::PseudoOptional: |
return element && element->isOptionalFormControl(); |
case CSSSelector::PseudoRequired: |