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

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

Issue 150103007: Use fastGetAttribute in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add more instances 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
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 309c06602154c5653169ff3ecbf8be7c8b883e0a..511aa03cae9921b0aa6b8606395c5e9694030c71 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -182,8 +182,9 @@ const AtomicString& HTMLImageElement::altText() const
// lets figure out the alt text.. magic stuff
// http://www.w3.org/TR/1998/REC-html40-19980424/appendix/notes.html#altgen
// also heavily discussed by Hixie on bugzilla
- if (!getAttribute(altAttr).isNull())
- return getAttribute(altAttr);
+ const AtomicString& alt = fastGetAttribute(altAttr);
+ if (!alt.isNull())
+ return alt;
// fall back to title attribute
return getAttribute(titleAttr);
Inactive 2014/02/13 16:03:43 Why don't we use fastGetAttribute for this one?
}
@@ -320,7 +321,7 @@ bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const
const AtomicString& HTMLImageElement::alt() const
{
- return getAttribute(altAttr);
+ return fastGetAttribute(altAttr);
}
bool HTMLImageElement::draggable() const

Powered by Google App Engine
This is Rietveld 408576698