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) |