| 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 c86b8615816157fb061714c10438ec82a1bfd9dc..cb6d4e3902bd45aed09d35b7733f904e378d3476 100644
|
| --- a/third_party/WebKit/Source/core/html/LinkStyle.cpp
|
| +++ b/third_party/WebKit/Source/core/html/LinkStyle.cpp
|
| @@ -306,8 +306,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;
|
| @@ -387,16 +386,13 @@ void LinkStyle::process() {
|
|
|
| if (loadStylesheetIfNeeded(builder, type) == NotNeeded && m_sheet) {
|
| // we no longer contain a stylesheet, e.g. perhaps rel or type was changed
|
| - StyleSheet* removedSheet = m_sheet.get();
|
| clearSheet();
|
| - document().styleEngine().setNeedsActiveStyleUpdate(removedSheet,
|
| - FullStyleUpdate);
|
| + if (m_owner->isConnected())
|
| + document().styleEngine().setNeedsActiveStyleUpdate(m_owner->treeScope());
|
| }
|
| }
|
|
|
| -void LinkStyle::setSheetTitle(
|
| - const String& title,
|
| - StyleEngine::ActiveSheetsUpdate updateActiveSheets) {
|
| +void LinkStyle::setSheetTitle(const String& title) {
|
| if (!m_owner->isInDocumentTree() || !m_owner->relAttribute().isStyleSheet())
|
| return;
|
|
|
| @@ -407,10 +403,8 @@ void LinkStyle::setSheetTitle(
|
| return;
|
|
|
| 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() {
|
|
|