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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Rob Buis 2 * Copyright (C) 2006, 2007 Rob Buis
3 * Copyright (C) 2008 Apple, Inc. All rights reserved. 3 * Copyright (C) 2008 Apple, Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return process(element); 70 return process(element);
71 } 71 }
72 72
73 void StyleElement::removedFrom(Element& element, 73 void StyleElement::removedFrom(Element& element,
74 ContainerNode* insertionPoint) { 74 ContainerNode* insertionPoint) {
75 if (!insertionPoint->isConnected()) 75 if (!insertionPoint->isConnected())
76 return; 76 return;
77 77
78 Document& document = element.document(); 78 Document& document = element.document();
79 if (m_registeredAsCandidate) { 79 if (m_registeredAsCandidate) {
80 ShadowRoot* shadowRoot = element.containingShadowRoot(); 80 document.styleEngine().removeStyleSheetCandidateNode(element,
81 if (!shadowRoot) 81 *insertionPoint);
82 shadowRoot = insertionPoint->containingShadowRoot();
83
84 document.styleEngine().removeStyleSheetCandidateNode(
85 element, shadowRoot ? *toTreeScope(shadowRoot) : toTreeScope(document));
86 m_registeredAsCandidate = false; 82 m_registeredAsCandidate = false;
87 } 83 }
88 84
89 StyleSheet* removedSheet = m_sheet.get(); 85 StyleSheet* removedSheet = m_sheet.get();
90 86
91 if (m_sheet) 87 if (m_sheet)
92 clearSheet(element); 88 clearSheet(element);
93 if (removedSheet) 89 if (removedSheet)
94 document.styleEngine().setNeedsActiveStyleUpdate(removedSheet, 90 document.styleEngine().setNeedsActiveStyleUpdate(removedSheet,
95 AnalyzedStyleUpdate); 91 AnalyzedStyleUpdate);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 200
205 void StyleElement::startLoadingDynamicSheet(Document& document) { 201 void StyleElement::startLoadingDynamicSheet(Document& document) {
206 document.styleEngine().addPendingSheet(m_styleEngineContext); 202 document.styleEngine().addPendingSheet(m_styleEngineContext);
207 } 203 }
208 204
209 DEFINE_TRACE(StyleElement) { 205 DEFINE_TRACE(StyleElement) {
210 visitor->trace(m_sheet); 206 visitor->trace(m_sheet);
211 } 207 }
212 208
213 } // namespace blink 209 } // namespace blink
OLDNEW
« 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