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

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

Issue 365673002: Pass a struct to ContainerNode::childrenChanged() instead of separate arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove dead code Created 6 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 nodes.uncheckedAppend(m_distribution.at(i)); 182 nodes.uncheckedAppend(m_distribution.at(i));
183 183
184 return StaticNodeList::adopt(nodes); 184 return StaticNodeList::adopt(nodes);
185 } 185 }
186 186
187 bool InsertionPoint::rendererIsNeeded(const RenderStyle& style) 187 bool InsertionPoint::rendererIsNeeded(const RenderStyle& style)
188 { 188 {
189 return !isActive() && HTMLElement::rendererIsNeeded(style); 189 return !isActive() && HTMLElement::rendererIsNeeded(style);
190 } 190 }
191 191
192 void InsertionPoint::childrenChanged(bool changedByParser, Node* beforeChange, N ode* afterChange, int childCountDelta) 192 void InsertionPoint::childrenChanged(const ChildrenChange& change)
193 { 193 {
194 HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, chi ldCountDelta); 194 HTMLElement::childrenChanged(change);
195 if (ShadowRoot* root = containingShadowRoot()) { 195 if (ShadowRoot* root = containingShadowRoot()) {
196 if (ElementShadow* rootOwner = root->owner()) 196 if (ElementShadow* rootOwner = root->owner())
197 rootOwner->setNeedsDistributionRecalc(); 197 rootOwner->setNeedsDistributionRecalc();
198 } 198 }
199 } 199 }
200 200
201 Node::InsertionNotificationRequest InsertionPoint::insertedInto(ContainerNode* i nsertionPoint) 201 Node::InsertionNotificationRequest InsertionPoint::insertedInto(ContainerNode* i nsertionPoint)
202 { 202 {
203 HTMLElement::insertedInto(insertionPoint); 203 HTMLElement::insertedInto(insertionPoint);
204 if (ShadowRoot* root = containingShadowRoot()) { 204 if (ShadowRoot* root = containingShadowRoot()) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 if (!insertionPoints) 286 if (!insertionPoints)
287 return; 287 return;
288 for (size_t i = 0; i < insertionPoints->size(); ++i) 288 for (size_t i = 0; i < insertionPoints->size(); ++i)
289 results.append(insertionPoints->at(i).get()); 289 results.append(insertionPoints->at(i).get());
290 ASSERT(current != insertionPoints->last().get()); 290 ASSERT(current != insertionPoints->last().get());
291 current = insertionPoints->last().get(); 291 current = insertionPoints->last().get();
292 } 292 }
293 } 293 }
294 294
295 } // namespace WebCore 295 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698