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

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

Issue 236753004: Re-land "Improve support for :read-only and :read-write pseudoclasses". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 6f8e4ed7224c75efa40fdd1ad82031410c83382d..403cd8389a08ff2db666da04de22d0e584ea14fa 100644
--- a/Source/core/rendering/RenderTheme.cpp
+++ b/Source/core/rendering/RenderTheme.cpp
@@ -33,6 +33,7 @@
#include "core/frame/LocalFrame.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"
@@ -762,9 +763,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