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()) { |