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

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

Issue 2554873002: Mark correct tree-scope dirty removing link in shadow. (Closed)
Patch Set: Rebased 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/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;
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698