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

Unified Diff: Source/core/html/HTMLElement.cpp

Issue 184613003: Avoid double attribute lookup in HTMLElement::matchesReadWritePseudoClass() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 782fe00503477feeb3e081c6adf645978849b80d..e7ae5b4e4d0de69e9275df70e413f895c87f0b67 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -935,9 +935,8 @@ bool HTMLElement::matchesReadOnlyPseudoClass() const
bool HTMLElement::matchesReadWritePseudoClass() const
{
- if (fastHasAttribute(contenteditableAttr)) {
- const AtomicString& value = fastGetAttribute(contenteditableAttr);
-
+ const AtomicString& value = fastGetAttribute(contenteditableAttr);
+ if (!value.isNull()) {
if (value.isEmpty() || equalIgnoringCase(value, "true") || equalIgnoringCase(value, "plaintext-only"))
return true;
if (equalIgnoringCase(value, "false"))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698