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

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
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/StyleEngine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ProcessingInstruction.cpp
diff --git a/Source/core/dom/ProcessingInstruction.cpp b/Source/core/dom/ProcessingInstruction.cpp
index c3d42a1d562ad10facd600809d079c7df4bafa40..acde8a36885488ae3439f3911c6e80be6876463c 100644
--- a/Source/core/dom/ProcessingInstruction.cpp
+++ b/Source/core/dom/ProcessingInstruction.cpp
@@ -289,21 +289,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());
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698