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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More assert fixes Created 4 years, 7 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/html/HTMLLinkElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index f8ce12194284324ffa41a7c1d1e18dbf57e7ccb1..746d39840603a7113a7b7394a440b9757aeb2af3 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -305,13 +305,8 @@ void HTMLLinkElement::removedFrom(ContainerNode* insertionPoint)
return;
}
document().styleEngine().removeStyleSheetCandidateNode(this);
-
- StyleSheet* removedSheet = sheet();
-
if (m_link)
m_link->ownerRemoved();
-
- document().styleEngine().setNeedsActiveStyleUpdate(removedSheet, FullStyleUpdate);
}
void HTMLLinkElement::finishParsingChildren()
@@ -761,11 +756,14 @@ void LinkStyle::process()
removePendingSheet();
notifyLoadedSheetAndAllCriticalSubresources(Node::ErrorOccurredLoadingSubresource);
}
+ String title = m_owner->title();
+ if (!title.isEmpty() && !m_owner->isAlternate() && m_disabledState != EnabledViaScript)
+ document().styleEngine().setPreferredStylesheetSetNameIfNotSet(title);
} else if (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->inShadowIncludingDocument())
+ document().styleEngine().setNeedsActiveStyleUpdate(m_owner->treeScope());
}
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698