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

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

Issue 751593002: Removed add/removeScopedStyleResolver from StyleEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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: Source/core/dom/ProcessingInstruction.cpp
diff --git a/Source/core/dom/ProcessingInstruction.cpp b/Source/core/dom/ProcessingInstruction.cpp
index 1459449179d1f40f08a7bb9da07274463f9812cd..3c32aa24fc1cab67a32f83e5908f98e6d87a1dec 100644
--- a/Source/core/dom/ProcessingInstruction.cpp
+++ b/Source/core/dom/ProcessingInstruction.cpp
@@ -272,21 +272,19 @@ void ProcessingInstruction::removedFrom(ContainerNode* insertionPoint)
if (!insertionPoint->inDocument())
return;
+ // No need to remove XSLStyleSheet from StyleEngine.
if (!DocumentXSLT::processingInstructionRemovedFromDocument(document(), this))
document().styleEngine()->removeStyleSheetCandidateNode(this);
- // No need to remove XSLStyleSheet from StyleEngine.
RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet;
-
if (m_sheet) {
ASSERT(m_sheet->ownerNode() == this);
clearSheet();
- } else if (resource()) {
- ASSERT(m_loading);
- document().styleEngine()->removePendingSheet(this);
- clearResource();
}
+ // No need to remove pending sheets.
+ clearResource();
+
// If we're in document teardown, then we don't need to do any notification of our sheet's removal.
if (document().isActive())
document().removedStyleSheet(removedSheet.get());

Powered by Google App Engine
This is Rietveld 408576698