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

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

Issue 395633007: Call ContainerNode::checkForSiblingStyleChanges() for Element insertion / removal only (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and fix nit Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Element.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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 m_registeredWithParentShadowRoot = false; 201 m_registeredWithParentShadowRoot = false;
202 } 202 }
203 203
204 DocumentFragment::removedFrom(insertionPoint); 204 DocumentFragment::removedFrom(insertionPoint);
205 } 205 }
206 206
207 void ShadowRoot::childrenChanged(const ChildrenChange& change) 207 void ShadowRoot::childrenChanged(const ChildrenChange& change)
208 { 208 {
209 ContainerNode::childrenChanged(change); 209 ContainerNode::childrenChanged(change);
210 210
211 checkForSiblingStyleChanges(change.type == ChildRemoved ? SiblingRemoved : O ther, change.siblingBeforeChange, change.siblingAfterChange); 211 if (change.isChildElementChange())
212 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme ntRemoved : SiblingElementInserted, change.siblingBeforeChange, change.siblingAf terChange);
212 213
213 if (InsertionPoint* point = shadowInsertionPointOfYoungerShadowRoot()) { 214 if (InsertionPoint* point = shadowInsertionPointOfYoungerShadowRoot()) {
214 if (ShadowRoot* root = point->containingShadowRoot()) 215 if (ShadowRoot* root = point->containingShadowRoot())
215 root->owner()->setNeedsDistributionRecalc(); 216 root->owner()->setNeedsDistributionRecalc();
216 } 217 }
217 } 218 }
218 219
219 void ShadowRoot::registerScopedHTMLStyleChild() 220 void ShadowRoot::registerScopedHTMLStyleChild()
220 { 221 {
221 ++m_numberOfStyles; 222 ++m_numberOfStyles;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 void ShadowRoot::trace(Visitor* visitor) 336 void ShadowRoot::trace(Visitor* visitor)
336 { 337 {
337 visitor->trace(m_prev); 338 visitor->trace(m_prev);
338 visitor->trace(m_next); 339 visitor->trace(m_next);
339 visitor->trace(m_shadowRootRareData); 340 visitor->trace(m_shadowRootRareData);
340 TreeScope::trace(visitor); 341 TreeScope::trace(visitor);
341 DocumentFragment::trace(visitor); 342 DocumentFragment::trace(visitor);
342 } 343 }
343 344
344 } 345 }
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698