Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1313)

Unified Diff: Source/core/rendering/RenderTheme.cpp

Issue 148223004: Improve support for :read-only and :read-write pseudoclasses. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove html, head and body tags from test. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698