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

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

Issue 2229503002: Style invalidation support for :first/last/only-child. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review issue Created 4 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
« no previous file with comments | « third_party/WebKit/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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 DocumentFragment::removedFrom(insertionPoint); 197 DocumentFragment::removedFrom(insertionPoint);
198 } 198 }
199 199
200 void ShadowRoot::childrenChanged(const ChildrenChange& change) 200 void ShadowRoot::childrenChanged(const ChildrenChange& change)
201 { 201 {
202 ContainerNode::childrenChanged(change); 202 ContainerNode::childrenChanged(change);
203 203
204 if (change.isChildElementChange()) 204 if (change.isChildElementChange())
205 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme ntRemoved : SiblingElementInserted, change.siblingChanged, change.siblingBeforeC hange, change.siblingAfterChange); 205 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme ntRemoved : SiblingElementInserted, toElement(change.siblingChanged), change.sib lingBeforeChange, change.siblingAfterChange);
206 206
207 if (InsertionPoint* point = shadowInsertionPointOfYoungerShadowRoot()) { 207 if (InsertionPoint* point = shadowInsertionPointOfYoungerShadowRoot()) {
208 if (ShadowRoot* root = point->containingShadowRoot()) 208 if (ShadowRoot* root = point->containingShadowRoot())
209 root->owner()->setNeedsDistributionRecalc(); 209 root->owner()->setNeedsDistributionRecalc();
210 } 210 }
211 } 211 }
212 212
213 void ShadowRoot::registerScopedHTMLStyleChild() 213 void ShadowRoot::registerScopedHTMLStyleChild()
214 { 214 {
215 ++m_numberOfStyles; 215 ++m_numberOfStyles;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 ostream << "ShadowRootType::Open"; 335 ostream << "ShadowRootType::Open";
336 break; 336 break;
337 case ShadowRootType::Closed: 337 case ShadowRootType::Closed:
338 ostream << "ShadowRootType::Closed"; 338 ostream << "ShadowRootType::Closed";
339 break; 339 break;
340 } 340 }
341 return ostream; 341 return ostream;
342 } 342 }
343 343
344 } // namespace blink 344 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698