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

Unified Diff: third_party/WebKit/Source/core/html/HTMLLinkElement.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
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp ('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/HTMLLinkElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index f628f932a3883f5b228bbe351888686e5096ee67..6c12df483749860c9894655395d77cfb4110b890 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -661,6 +661,10 @@ void LinkStyle::process()
m_loading = true;
+ String title = m_owner->title();
+ if (!title.isEmpty() && !m_owner->isAlternate() && m_disabledState != EnabledViaScript)
+ document().styleEngine().setPreferredStylesheetSetNameIfNotSet(title);
+
bool mediaQueryMatches = true;
LocalFrame* frame = loadingFrame();
if (!m_owner->media().isEmpty() && frame && frame->document()) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698