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

Unified Diff: Source/core/dom/ShadowTreeStyleSheetCollection.cpp

Issue 199893006: Remove bogus if check in ShadowTreeStyleSheetCollection::collectStyleSheets() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/dom/ShadowTreeStyleSheetCollection.cpp
diff --git a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
index 3e819928f682563f59ad05d4799d7d80e77992bf..38f05b3ccee3c0098d8c73f6a3cd66d81a9f649f 100644
--- a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
+++ b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
@@ -67,18 +67,16 @@ 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?
- const AtomicString& rel = element->fastGetAttribute(relAttr);
if (!enabledViaScript && sheet && !title.isEmpty()) {
if (engine->preferredStylesheetSetName().isEmpty()) {
- if (element->hasLocalName(styleTag) || !rel.contains("alternate")) {
- engine->setPreferredStylesheetSetName(title);
- engine->setSelectedStylesheetSetName(title);
- }
+ engine->setPreferredStylesheetSetName(title);
+ engine->setSelectedStylesheetSetName(title);
}
if (title != engine->preferredStylesheetSetName())
activeSheet = 0;
}
+ const AtomicString& rel = element->fastGetAttribute(relAttr);
if (rel.contains("alternate") && title.isEmpty())
activeSheet = 0;
« 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