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

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: Use fastGEtAttribute more for titleAttr 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/HTMLHtmlElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 309c06602154c5653169ff3ecbf8be7c8b883e0a..bed556d30ffc1e5b8771cdbc2fa1bdd38948d4ff 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -182,10 +182,11 @@ 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);
+ return fastGetAttribute(titleAttr);
}
RenderObject* HTMLImageElement::createRenderer(RenderStyle* style)
@@ -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
« no previous file with comments | « Source/core/html/HTMLHtmlElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698