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

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: Build fix Created 6 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 | 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 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 1761
1762 if (!style || (styleAffectedByEmpty() && (!style->emptyState() || hasChildre n()))) 1762 if (!style || (styleAffectedByEmpty() && (!style->emptyState() || hasChildre n())))
1763 setNeedsStyleRecalc(SubtreeStyleChange); 1763 setNeedsStyleRecalc(SubtreeStyleChange);
1764 } 1764 }
1765 1765
1766 void Element::childrenChanged(const ChildrenChange& change) 1766 void Element::childrenChanged(const ChildrenChange& change)
1767 { 1767 {
1768 ContainerNode::childrenChanged(change); 1768 ContainerNode::childrenChanged(change);
1769 1769
1770 checkForEmptyStyleChange(); 1770 checkForEmptyStyleChange();
1771 if (!change.byParser) 1771 if (!change.byParser && change.isChildElementChange())
1772 checkForSiblingStyleChanges(change.type == ChildRemoved ? SiblingRemoved : Other, change.siblingBeforeChange, change.siblingAfterChange); 1772 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme ntRemoved : SiblingElementInserted, change.siblingBeforeChange, change.siblingAf terChange);
1773 1773
1774 if (ElementShadow* shadow = this->shadow()) 1774 if (ElementShadow* shadow = this->shadow())
1775 shadow->setNeedsDistributionRecalc(); 1775 shadow->setNeedsDistributionRecalc();
1776 } 1776 }
1777 1777
1778 void Element::finishParsingChildren() 1778 void Element::finishParsingChildren()
1779 { 1779 {
1780 setIsFinishedParsingChildren(true); 1780 setIsFinishedParsingChildren(true);
1781 checkForEmptyStyleChange(); 1781 checkForEmptyStyleChange();
1782 checkForSiblingStyleChanges(FinishedParsingChildren, lastChild(), nullptr); 1782 checkForSiblingStyleChanges(FinishedParsingChildren, lastChild(), nullptr);
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
3306 { 3306 {
3307 #if ENABLE(OILPAN) 3307 #if ENABLE(OILPAN)
3308 if (hasRareData()) 3308 if (hasRareData())
3309 visitor->trace(elementRareData()); 3309 visitor->trace(elementRareData());
3310 visitor->trace(m_elementData); 3310 visitor->trace(m_elementData);
3311 #endif 3311 #endif
3312 ContainerNode::trace(visitor); 3312 ContainerNode::trace(visitor);
3313 } 3313 }
3314 3314
3315 } // namespace blink 3315 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698