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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp

Issue 1769903002: Move preferred stylesheet logic into StyleEngine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp b/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp
index 8de17ce840b43fadb7ba5b27f94f99485cfc4383..028b48bccd0f718544382728f435bf662eb1a3a8 100644
--- a/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp
@@ -62,8 +62,8 @@ void DocumentStyleSheetCollection::collectStyleSheetsFromCandidates(StyleEngine&
if (candidate.isEnabledAndLoading()) {
// it is loading but we should still decide which style sheet set to use
- if (candidate.hasPreferrableName(engine.preferredStylesheetSetName()))
- engine.selectStylesheetSetName(candidate.title());
+ if (candidate.hasPreferrableName())
+ engine.setPreferredStylesheetSetNameIfNotSet(candidate.title());
continue;
}
@@ -71,8 +71,8 @@ void DocumentStyleSheetCollection::collectStyleSheetsFromCandidates(StyleEngine&
if (!sheet)
continue;
- if (candidate.hasPreferrableName(engine.preferredStylesheetSetName()))
- engine.selectStylesheetSetName(candidate.title());
+ if (candidate.hasPreferrableName())
+ engine.setPreferredStylesheetSetNameIfNotSet(candidate.title());
collector.appendSheetForList(sheet);
if (candidate.canBeActivated(engine.preferredStylesheetSetName()))
collector.appendActiveStyleSheet(toCSSStyleSheet(sheet));
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698