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

Side by Side 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, 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 { 1789 {
1790 RenderStyle* style = renderStyle(); 1790 RenderStyle* style = renderStyle();
1791 1791
1792 if (!style && !styleAffectedByEmpty()) 1792 if (!style && !styleAffectedByEmpty())
1793 return; 1793 return;
1794 1794
1795 if (!style || (styleAffectedByEmpty() && (!style->emptyState() || hasChildre n()))) 1795 if (!style || (styleAffectedByEmpty() && (!style->emptyState() || hasChildre n())))
1796 setNeedsStyleRecalc(SubtreeStyleChange); 1796 setNeedsStyleRecalc(SubtreeStyleChange);
1797 } 1797 }
1798 1798
1799 void Element::childrenChanged(bool changedByParser, Node* beforeChange, Node* af terChange, int childCountDelta) 1799 void Element::childrenChanged(const ChildrenChange& change)
1800 { 1800 {
1801 ContainerNode::childrenChanged(changedByParser, beforeChange, afterChange, c hildCountDelta); 1801 ContainerNode::childrenChanged(change);
1802 1802
1803 checkForEmptyStyleChange(); 1803 checkForEmptyStyleChange();
1804 if (!changedByParser) 1804 if (!change.byParser)
1805 checkForSiblingStyleChanges(false, beforeChange, afterChange, childCount Delta); 1805 checkForSiblingStyleChanges(change.type == ChildRemoved ? SiblingRemoved : Other, change.siblingBeforeChange, change.siblingAfterChange);
1806 1806
1807 if (ElementShadow* shadow = this->shadow()) 1807 if (ElementShadow* shadow = this->shadow())
1808 shadow->setNeedsDistributionRecalc(); 1808 shadow->setNeedsDistributionRecalc();
1809 } 1809 }
1810 1810
1811 void Element::finishParsingChildren() 1811 void Element::finishParsingChildren()
1812 { 1812 {
1813 setIsFinishedParsingChildren(true); 1813 setIsFinishedParsingChildren(true);
1814 checkForEmptyStyleChange(); 1814 checkForEmptyStyleChange();
1815 checkForSiblingStyleChanges(true, lastChild(), 0, 0); 1815 checkForSiblingStyleChanges(FinishedParsingChildren, lastChild(), nullptr);
1816 } 1816 }
1817 1817
1818 #ifndef NDEBUG 1818 #ifndef NDEBUG
1819 void Element::formatForDebugger(char* buffer, unsigned length) const 1819 void Element::formatForDebugger(char* buffer, unsigned length) const
1820 { 1820 {
1821 StringBuilder result; 1821 StringBuilder result;
1822 String s; 1822 String s;
1823 1823
1824 result.append(nodeName()); 1824 result.append(nodeName());
1825 1825
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
3339 3339
3340 void Element::trace(Visitor* visitor) 3340 void Element::trace(Visitor* visitor)
3341 { 3341 {
3342 if (hasRareData()) 3342 if (hasRareData())
3343 visitor->trace(elementRareData()); 3343 visitor->trace(elementRareData());
3344 visitor->trace(m_elementData); 3344 visitor->trace(m_elementData);
3345 ContainerNode::trace(visitor); 3345 ContainerNode::trace(visitor);
3346 } 3346 }
3347 3347
3348 } // namespace WebCore 3348 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698