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

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

Issue 2546393002: Make setNeedsActiveStyleUpdate mark treescope dirty only. (Closed)
Patch Set: Created 4 years 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/dom/ProcessingInstruction.cpp
diff --git a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
index 051b670bc02913491fdc7248ac1dd30ef43e3f46..60f7095eea393e5c4a4ac8a354811bb15aaf103c 100644
--- a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
+++ b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
@@ -272,20 +272,21 @@ void ProcessingInstruction::removedFrom(ContainerNode* insertionPoint) {
if (!DocumentXSLT::processingInstructionRemovedFromDocument(document(), this))
document().styleEngine().removeStyleSheetCandidateNode(*this);
- StyleSheet* removedSheet = m_sheet;
if (m_sheet) {
DCHECK_EQ(m_sheet->ownerNode(), this);
clearSheet();
+ document().styleEngine().setNeedsActiveStyleUpdate(treeScope());
}
// No need to remove pending sheets.
clearResource();
+ // TODO(rune@opera.com): resolverChanged() can be removed once stylesheet
+ // updates are async. https://crbug.com/567021
// If we're in document teardown, then we don't need to do any notification of
// our sheet's removal.
if (document().isActive())
- document().styleEngine().setNeedsActiveStyleUpdate(removedSheet,
- FullStyleUpdate);
+ document().styleEngine().resolverChanged(FullStyleUpdate);
}
void ProcessingInstruction::clearSheet() {

Powered by Google App Engine
This is Rietveld 408576698