Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1747 return hasRareData() ? elementRareData()->shadow() : nullptr; | 1747 return hasRareData() ? elementRareData()->shadow() : nullptr; |
| 1748 } | 1748 } |
| 1749 | 1749 |
| 1750 ElementShadow& Element::ensureShadow() | 1750 ElementShadow& Element::ensureShadow() |
| 1751 { | 1751 { |
| 1752 return ensureElementRareData().ensureShadow(); | 1752 return ensureElementRareData().ensureShadow(); |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 void Element::pseudoStateChanged(CSSSelector::PseudoType pseudo) | 1755 void Element::pseudoStateChanged(CSSSelector::PseudoType pseudo) |
| 1756 { | 1756 { |
| 1757 if (document().inStyleRecalc()) | |
|
ojan
2015/06/19 01:05:02
Add a comment explaining why we do this?
| |
| 1758 return; | |
| 1759 | |
| 1757 StyleResolver* styleResolver = document().styleResolver(); | 1760 StyleResolver* styleResolver = document().styleResolver(); |
| 1758 | |
| 1759 if (inActiveDocument() && styleResolver && styleChangeType() < SubtreeStyleC hange) | 1761 if (inActiveDocument() && styleResolver && styleChangeType() < SubtreeStyleC hange) |
| 1760 document().styleEngine().pseudoStateChangedForElement(pseudo, *this); | 1762 document().styleEngine().pseudoStateChangedForElement(pseudo, *this); |
| 1761 } | 1763 } |
| 1762 | 1764 |
| 1763 void Element::setAnimationStyleChange(bool animationStyleChange) | 1765 void Element::setAnimationStyleChange(bool animationStyleChange) |
| 1764 { | 1766 { |
| 1765 if (animationStyleChange && document().inStyleRecalc()) | 1767 if (animationStyleChange && document().inStyleRecalc()) |
| 1766 return; | 1768 return; |
| 1767 if (!hasRareData()) | 1769 if (!hasRareData()) |
| 1768 return; | 1770 return; |
| (...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3424 { | 3426 { |
| 3425 #if ENABLE(OILPAN) | 3427 #if ENABLE(OILPAN) |
| 3426 if (hasRareData()) | 3428 if (hasRareData()) |
| 3427 visitor->trace(elementRareData()); | 3429 visitor->trace(elementRareData()); |
| 3428 visitor->trace(m_elementData); | 3430 visitor->trace(m_elementData); |
| 3429 #endif | 3431 #endif |
| 3430 ContainerNode::trace(visitor); | 3432 ContainerNode::trace(visitor); |
| 3431 } | 3433 } |
| 3432 | 3434 |
| 3433 } // namespace blink | 3435 } // namespace blink |
| OLD | NEW |