Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/dom/StyleElement.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.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/dom/StyleElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleElement.cpp b/third_party/WebKit/Source/core/dom/StyleElement.cpp
index 269d5048f0d04d18b9afb8ec0efc4db4bf7d675f..b7ce53e46fe1bf4e13b25acf3614213ceacf7060 100644
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -97,12 +97,11 @@ void StyleElement::removedFrom(Element* element, ContainerNode* insertionPoint)
m_registeredAsCandidate = false;
}
- StyleSheet* removedSheet = m_sheet.get();
-
- if (m_sheet)
+ if (m_sheet) {
clearSheet(element);
- if (removedSheet)
- document.styleEngine().setNeedsActiveStyleUpdate(removedSheet, AnalyzedStyleUpdate);
+ if (element->inShadowIncludingDocument())
+ document.styleEngine().setNeedsActiveStyleUpdate(element->treeScope());
+ }
}
void StyleElement::clearDocumentData(Document& document, Element* element)

Powered by Google App Engine