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

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

Issue 2079303002: Move preferred stylesheet set out of active sheet update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
Index: third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
diff --git a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
index 0c9eb8c53acd5243a3f0774d6857e3dfc482e3b9..0642914ea4f389af124c1589923a7dcf42e4bf9d 100644
--- a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
+++ b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
@@ -205,6 +205,8 @@ void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas
CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, this);
cssSheet->setDisabled(m_alternate);
cssSheet->setTitle(m_title);
+ if (!m_alternate && !m_title.isEmpty())
+ document().styleEngine().setPreferredStylesheetSetNameIfNotSet(m_title);
cssSheet->setMediaQueries(MediaQuerySet::create(m_media));
m_sheet = cssSheet;

Powered by Google App Engine
This is Rietveld 408576698