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

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: Fix handling of ancestral changes in contenteditable attribute. Created 6 years, 11 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
Index: Source/core/rendering/RenderTheme.cpp
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp
index 8d9e787c266e5e32b364d4f133cd77a930b3304c..19cd3407c46f5ef8cb1c7c9df3849849e7fa35c9 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"
@@ -774,9 +775,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

Powered by Google App Engine
This is Rietveld 408576698