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

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

Issue 1000413003: Clear need for animation style for forced styleForElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review issue: removed constness Created 5 years, 9 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
« no previous file with comments | « Source/core/dom/Element.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationFo rPseudoChange(pseudo, *this); 1724 styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationFo rPseudoChange(pseudo, *this);
1725 1725
1726 if (ElementShadow* elementShadow = shadowWhereNodeCanBeDistributed(*this)) 1726 if (ElementShadow* elementShadow = shadowWhereNodeCanBeDistributed(*this))
1727 elementShadow->distributedNodePseudoStateChanged(pseudo); 1727 elementShadow->distributedNodePseudoStateChanged(pseudo);
1728 } 1728 }
1729 1729
1730 void Element::setAnimationStyleChange(bool animationStyleChange) 1730 void Element::setAnimationStyleChange(bool animationStyleChange)
1731 { 1731 {
1732 if (animationStyleChange && document().inStyleRecalc()) 1732 if (animationStyleChange && document().inStyleRecalc())
1733 return; 1733 return;
1734 if (!hasRareData())
1735 return;
1734 if (ElementAnimations* elementAnimations = elementRareData()->elementAnimati ons()) 1736 if (ElementAnimations* elementAnimations = elementRareData()->elementAnimati ons())
1735 elementAnimations->setAnimationStyleChange(animationStyleChange); 1737 elementAnimations->setAnimationStyleChange(animationStyleChange);
1736 } 1738 }
1737 1739
1740 void Element::clearAnimationStyleChange()
1741 {
1742 if (!hasRareData())
1743 return;
1744 if (ElementAnimations* elementAnimations = elementRareData()->elementAnimati ons())
1745 elementAnimations->setAnimationStyleChange(false);
1746 }
1747
1738 void Element::setNeedsAnimationStyleRecalc() 1748 void Element::setNeedsAnimationStyleRecalc()
1739 { 1749 {
1740 if (styleChangeType() != NoStyleChange) 1750 if (styleChangeType() != NoStyleChange)
1741 return; 1751 return;
1742 1752
1743 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St yleChangeReason::Animation)); 1753 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St yleChangeReason::Animation));
1744 setAnimationStyleChange(true); 1754 setAnimationStyleChange(true);
1745 } 1755 }
1746 1756
1747 void Element::setNeedsCompositingUpdate() 1757 void Element::setNeedsCompositingUpdate()
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
3372 { 3382 {
3373 #if ENABLE(OILPAN) 3383 #if ENABLE(OILPAN)
3374 if (hasRareData()) 3384 if (hasRareData())
3375 visitor->trace(elementRareData()); 3385 visitor->trace(elementRareData());
3376 visitor->trace(m_elementData); 3386 visitor->trace(m_elementData);
3377 #endif 3387 #endif
3378 ContainerNode::trace(visitor); 3388 ContainerNode::trace(visitor);
3379 } 3389 }
3380 3390
3381 } // namespace blink 3391 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Element.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698