Index: Source/core/rendering/RenderTheme.cpp |
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp |
index 329aa8567c6a0f261efd545c0b796883b207424e..44243a8cdb0abdf79e8b8b0911bfd1be5df6dfa7 100644 |
--- a/Source/core/rendering/RenderTheme.cpp |
+++ b/Source/core/rendering/RenderTheme.cpp |
@@ -32,6 +32,7 @@ |
#include "core/fileapi/FileList.h" |
#include "core/html/HTMLCollection.h" |
#include "core/html/HTMLDataListElement.h" |
+#include "core/html/HTMLFormControlElement.h" |
#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLMeterElement.h" |
#include "core/html/HTMLOptionElement.h" |
@@ -769,9 +770,10 @@ bool RenderTheme::isSpinUpButtonPartPressed(const RenderObject* o) const |
bool RenderTheme::isReadOnlyControl(const RenderObject* o) const |
{ |
Node* node = o->node(); |
- if (!node || !node->isElementNode()) |
+ if (!node || !node->isElementNode() || !toElement(node)->isFormControlElement()) |
return false; |
- return toElement(node)->matchesReadOnlyPseudoClass(); |
+ HTMLFormControlElement* element = toHTMLFormControlElement(node); |
+ return element->isReadOnly(); |
} |
bool RenderTheme::isHovered(const RenderObject* o) const |