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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed html import issue. 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 8c018f280d7219936d6846d8604753de4b3f077c..7dd271f1e8b1f9dd0919da3a408c0193bdcfbec1 100644
--- a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
+++ b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
@@ -204,8 +204,7 @@ void ProcessingInstruction::setCSSStyleSheet(
cssSheet->setDisabled(m_alternate);
cssSheet->setTitle(m_title);
if (!m_alternate && !m_title.isEmpty())
- document().styleEngine().setPreferredStylesheetSetNameIfNotSet(
- m_title, StyleEngine::DontUpdateActiveSheets);
+ document().styleEngine().setPreferredStylesheetSetNameIfNotSet(m_title);
cssSheet->setMediaQueries(MediaQuerySet::create(m_media));
m_sheet = cssSheet;
@@ -272,20 +271,14 @@ 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();
-
- // 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);
}
void ProcessingInstruction::clearSheet() {

Powered by Google App Engine
This is Rietveld 408576698