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

Unified Diff: Source/core/dom/ShadowTreeStyleSheetCollection.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/dom/Element.cpp ('k') | Source/core/dom/StyleSheetCandidate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ShadowTreeStyleSheetCollection.cpp
diff --git a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
index 10d74769c07a3e4b0102959a0b367229d4086901..6a74608c5ea5a0763d8bd10e0ecda4c116a17014 100644
--- a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
+++ b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
@@ -57,7 +57,7 @@ void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine* engine, Sty
continue;
Element* element = toElement(node);
- AtomicString title = element->getAttribute(titleAttr);
+ const AtomicString& title = element->fastGetAttribute(titleAttr);
bool enabledViaScript = false;
sheet = toHTMLStyleElement(node)->sheet();
@@ -67,7 +67,7 @@ void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine* engine, Sty
// FIXME: clarify how PREFERRED or ALTERNATE works in shadow trees.
// Should we set preferred/selected stylesheets name in shadow trees and
// use the name in document?
- AtomicString rel = element->getAttribute(relAttr);
+ const AtomicString& rel = element->fastGetAttribute(relAttr);
if (!enabledViaScript && sheet && !title.isEmpty()) {
if (engine->preferredStylesheetSetName().isEmpty()) {
if (element->hasLocalName(styleTag) || !rel.contains("alternate")) {
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/StyleSheetCandidate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698