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

Unified Diff: Source/core/dom/Element.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, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 9a2c59156bb01e8c37d111c07fed8691376519ea..13577b2cd5c6461ba205b60bef80a7e75516ddc7 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1796,13 +1796,13 @@ void Element::checkForEmptyStyleChange()
setNeedsStyleRecalc(SubtreeStyleChange);
}
-void Element::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
+void Element::childrenChanged(const ChildrenChange& change)
{
- ContainerNode::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+ ContainerNode::childrenChanged(change);
checkForEmptyStyleChange();
- if (!changedByParser)
- checkForSiblingStyleChanges(false, beforeChange, afterChange, childCountDelta);
+ if (!change.byParser)
+ checkForSiblingStyleChanges(change.type == ChildRemoved ? SiblingRemoved : Other, change.siblingBeforeChange, change.siblingAfterChange);
if (ElementShadow* shadow = this->shadow())
shadow->setNeedsDistributionRecalc();
@@ -1812,7 +1812,7 @@ void Element::finishParsingChildren()
{
setIsFinishedParsingChildren(true);
checkForEmptyStyleChange();
- checkForSiblingStyleChanges(true, lastChild(), 0, 0);
+ checkForSiblingStyleChanges(FinishedParsingChildren, lastChild(), nullptr);
}
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698