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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 395633007: Call ContainerNode::checkForSiblingStyleChanges() for Element insertion / removal only (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo 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 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 1800
1801 if (!style || (styleAffectedByEmpty() && (!style->emptyState() || hasChildre n()))) 1801 if (!style || (styleAffectedByEmpty() && (!style->emptyState() || hasChildre n())))
1802 setNeedsStyleRecalc(SubtreeStyleChange); 1802 setNeedsStyleRecalc(SubtreeStyleChange);
1803 } 1803 }
1804 1804
1805 void Element::childrenChanged(const ChildrenChange& change) 1805 void Element::childrenChanged(const ChildrenChange& change)
1806 { 1806 {
1807 ContainerNode::childrenChanged(change); 1807 ContainerNode::childrenChanged(change);
1808 1808
1809 checkForEmptyStyleChange(); 1809 checkForEmptyStyleChange();
1810 if (!change.byParser) 1810 if (!change.byParser && change.isElementChange())
1811 checkForSiblingStyleChanges(change.type == ChildRemoved ? SiblingRemoved : Other, change.siblingBeforeChange, change.siblingAfterChange); 1811 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme ntRemoved : SiblingElementInserted, change.siblingBeforeChange, change.siblingAf terChange);
1812 1812
1813 if (ElementShadow* shadow = this->shadow()) 1813 if (ElementShadow* shadow = this->shadow())
1814 shadow->setNeedsDistributionRecalc(); 1814 shadow->setNeedsDistributionRecalc();
1815 } 1815 }
1816 1816
1817 void Element::finishParsingChildren() 1817 void Element::finishParsingChildren()
1818 { 1818 {
1819 setIsFinishedParsingChildren(true); 1819 setIsFinishedParsingChildren(true);
1820 checkForEmptyStyleChange(); 1820 checkForEmptyStyleChange();
1821 checkForSiblingStyleChanges(FinishedParsingChildren, lastChild(), nullptr); 1821 checkForSiblingStyleChanges(FinishedParsingChildren, lastChild(), nullptr);
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
3353 3353
3354 void Element::trace(Visitor* visitor) 3354 void Element::trace(Visitor* visitor)
3355 { 3355 {
3356 if (hasRareData()) 3356 if (hasRareData())
3357 visitor->trace(elementRareData()); 3357 visitor->trace(elementRareData());
3358 visitor->trace(m_elementData); 3358 visitor->trace(m_elementData);
3359 ContainerNode::trace(visitor); 3359 ContainerNode::trace(visitor);
3360 } 3360 }
3361 3361
3362 } // namespace WebCore 3362 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698