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 22f54058887bfb7bcd0ec787de00e013d728a910..88164e2fe64cae286488f553ce3dbbd125a969f9 100644 |
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp |
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp |
@@ -77,12 +77,8 @@ void StyleElement::removedFrom(Element& element, |
Document& document = element.document(); |
if (m_registeredAsCandidate) { |
- ShadowRoot* shadowRoot = element.containingShadowRoot(); |
- if (!shadowRoot) |
- shadowRoot = insertionPoint->containingShadowRoot(); |
- |
- document.styleEngine().removeStyleSheetCandidateNode( |
- element, shadowRoot ? *toTreeScope(shadowRoot) : toTreeScope(document)); |
+ document.styleEngine().removeStyleSheetCandidateNode(element, |
+ *insertionPoint); |
m_registeredAsCandidate = false; |
} |