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

Unified Diff: third_party/WebKit/Source/core/html/LinkStyle.cpp

Issue 2552353003: Setting preferred stylesheet simplified. (Closed)
Patch Set: Rebased. Created 4 years 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/html/LinkStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/LinkStyle.cpp
diff --git a/third_party/WebKit/Source/core/html/LinkStyle.cpp b/third_party/WebKit/Source/core/html/LinkStyle.cpp
index 82bb9d8ed7ab576c4955d1729b0576298dfd4cfe..5fe2f0c38d2fc89e410ab5a7b747e84aec82f526 100644
--- a/third_party/WebKit/Source/core/html/LinkStyle.cpp
+++ b/third_party/WebKit/Source/core/html/LinkStyle.cpp
@@ -307,8 +307,7 @@ LinkStyle::LoadReturnValue LinkStyle::loadStylesheetIfNeeded(
String title = m_owner->title();
if (!title.isEmpty() && !m_owner->isAlternate() &&
m_disabledState != EnabledViaScript && m_owner->isInDocumentTree()) {
- document().styleEngine().setPreferredStylesheetSetNameIfNotSet(
- title, StyleEngine::DontUpdateActiveSheets);
+ document().styleEngine().setPreferredStylesheetSetNameIfNotSet(title);
}
bool mediaQueryMatches = true;
@@ -396,9 +395,7 @@ void LinkStyle::process() {
}
}
-void LinkStyle::setSheetTitle(
- const String& title,
- StyleEngine::ActiveSheetsUpdate updateActiveSheets) {
+void LinkStyle::setSheetTitle(const String& title) {
if (!m_owner->isInDocumentTree() || !m_owner->relAttribute().isStyleSheet())
return;
@@ -409,10 +406,8 @@ void LinkStyle::setSheetTitle(
return;
const KURL& href = m_owner->getNonEmptyURLAttribute(hrefAttr);
- if (href.isValid() && !href.isEmpty()) {
- document().styleEngine().setPreferredStylesheetSetNameIfNotSet(
- title, updateActiveSheets);
- }
+ if (href.isValid() && !href.isEmpty())
+ document().styleEngine().setPreferredStylesheetSetNameIfNotSet(title);
}
void LinkStyle::ownerRemoved() {
« no previous file with comments | « third_party/WebKit/Source/core/html/LinkStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698