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

Side by Side Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 1131493008: WIP: Move StyleEngine::m_activeTreeScopes to TreeScope::m_childTreeScopesWithActiveStyleSheets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflected kochi's review Created 5 years, 7 months 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
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (m_registeredWithParentShadowRoot) { 183 if (m_registeredWithParentShadowRoot) {
184 ShadowRoot* root = host()->containingShadowRoot(); 184 ShadowRoot* root = host()->containingShadowRoot();
185 if (!root) 185 if (!root)
186 root = insertionPoint->containingShadowRoot(); 186 root = insertionPoint->containingShadowRoot();
187 if (root) 187 if (root)
188 root->removeChildShadowRoot(); 188 root->removeChildShadowRoot();
189 m_registeredWithParentShadowRoot = false; 189 m_registeredWithParentShadowRoot = false;
190 } 190 }
191 } 191 }
192 192
193 if (selfOrDescendantsHaveActiveStyleSheets())
194 clearSelfOrDescendantsHaveActiveStyleSheets();
195
193 DocumentFragment::removedFrom(insertionPoint); 196 DocumentFragment::removedFrom(insertionPoint);
194 } 197 }
195 198
196 void ShadowRoot::childrenChanged(const ChildrenChange& change) 199 void ShadowRoot::childrenChanged(const ChildrenChange& change)
197 { 200 {
198 ContainerNode::childrenChanged(change); 201 ContainerNode::childrenChanged(change);
199 202
200 if (change.isChildElementChange()) 203 if (change.isChildElementChange())
201 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme ntRemoved : SiblingElementInserted, change.siblingBeforeChange, change.siblingAf terChange); 204 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme ntRemoved : SiblingElementInserted, change.siblingBeforeChange, change.siblingAf terChange);
202 205
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 DEFINE_TRACE(ShadowRoot) 328 DEFINE_TRACE(ShadowRoot)
326 { 329 {
327 visitor->trace(m_prev); 330 visitor->trace(m_prev);
328 visitor->trace(m_next); 331 visitor->trace(m_next);
329 visitor->trace(m_shadowRootRareData); 332 visitor->trace(m_shadowRootRareData);
330 TreeScope::trace(visitor); 333 TreeScope::trace(visitor);
331 DocumentFragment::trace(visitor); 334 DocumentFragment::trace(visitor);
332 } 335 }
333 336
334 } 337 }
OLDNEW
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698