| 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 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 ASSERT(!parentOrShadowHostNode()->needsStyleRecalc()); | 1527 ASSERT(!parentOrShadowHostNode()->needsStyleRecalc()); |
| 1528 | 1528 |
| 1529 if (hasCustomStyleCallbacks()) | 1529 if (hasCustomStyleCallbacks()) |
| 1530 willRecalcStyle(change); | 1530 willRecalcStyle(change); |
| 1531 | 1531 |
| 1532 if (change >= Inherit || needsStyleRecalc()) { | 1532 if (change >= Inherit || needsStyleRecalc()) { |
| 1533 if (hasRareData()) { | 1533 if (hasRareData()) { |
| 1534 ElementRareData* data = elementRareData(); | 1534 ElementRareData* data = elementRareData(); |
| 1535 data->resetStyleState(); | 1535 data->resetStyleState(); |
| 1536 data->clearComputedStyle(); | 1536 data->clearComputedStyle(); |
| 1537 |
| 1538 if (change >= Inherit) { |
| 1539 if (ActiveAnimations* activeAnimations = data->activeAnimations(
)) |
| 1540 activeAnimations->setAnimationStyleChange(false); |
| 1541 } |
| 1537 } | 1542 } |
| 1538 if (parentRenderStyle()) | 1543 if (parentRenderStyle()) |
| 1539 change = recalcOwnStyle(change); | 1544 change = recalcOwnStyle(change); |
| 1540 clearNeedsStyleRecalc(); | 1545 clearNeedsStyleRecalc(); |
| 1541 } | 1546 } |
| 1542 | 1547 |
| 1543 // If we reattached we don't need to recalc the style of our descendants any
more. | 1548 // If we reattached we don't need to recalc the style of our descendants any
more. |
| 1544 if ((change >= Inherit && change < Reattach) || childNeedsStyleRecalc()) | 1549 if ((change >= Inherit && change < Reattach) || childNeedsStyleRecalc()) |
| 1545 recalcChildStyle(change); | 1550 recalcChildStyle(change); |
| 1546 clearChildNeedsStyleRecalc(); | 1551 clearChildNeedsStyleRecalc(); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 return ensureElementRareData().ensureShadow(); | 1721 return ensureElementRareData().ensureShadow(); |
| 1717 } | 1722 } |
| 1718 | 1723 |
| 1719 void Element::didAffectSelector(AffectedSelectorMask mask) | 1724 void Element::didAffectSelector(AffectedSelectorMask mask) |
| 1720 { | 1725 { |
| 1721 setNeedsStyleRecalc(); | 1726 setNeedsStyleRecalc(); |
| 1722 if (ElementShadow* elementShadow = shadowWhereNodeCanBeDistributed(*this)) | 1727 if (ElementShadow* elementShadow = shadowWhereNodeCanBeDistributed(*this)) |
| 1723 elementShadow->didAffectSelector(mask); | 1728 elementShadow->didAffectSelector(mask); |
| 1724 } | 1729 } |
| 1725 | 1730 |
| 1731 void Element::setAnimationStyleChange(bool animationStyleChange) |
| 1732 { |
| 1733 if (ActiveAnimations* activeAnimations = elementRareData()->activeAnimations
()) |
| 1734 activeAnimations->setAnimationStyleChange(animationStyleChange); |
| 1735 } |
| 1736 |
| 1737 void Element::setNeedsAnimationStyleRecalc() |
| 1738 { |
| 1739 if (styleChangeType() != NoStyleChange) |
| 1740 return; |
| 1741 |
| 1742 setNeedsStyleRecalc(LocalStyleChange, StyleChangeFromRenderer); |
| 1743 setAnimationStyleChange(true); |
| 1744 } |
| 1745 |
| 1726 PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState) | 1746 PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState) |
| 1727 { | 1747 { |
| 1728 if (alwaysCreateUserAgentShadowRoot()) | 1748 if (alwaysCreateUserAgentShadowRoot()) |
| 1729 ensureUserAgentShadowRoot(); | 1749 ensureUserAgentShadowRoot(); |
| 1730 | 1750 |
| 1731 if (RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled()) | 1751 if (RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled()) |
| 1732 return PassRefPtr<ShadowRoot>(ensureShadow().addShadowRoot(*this, Shadow
Root::AuthorShadowRoot)); | 1752 return PassRefPtr<ShadowRoot>(ensureShadow().addShadowRoot(*this, Shadow
Root::AuthorShadowRoot)); |
| 1733 | 1753 |
| 1734 // Since some elements recreates shadow root dynamically, multiple shadow | 1754 // Since some elements recreates shadow root dynamically, multiple shadow |
| 1735 // subtrees won't work well in that element. Until they are fixed, we disabl
e | 1755 // subtrees won't work well in that element. Until they are fixed, we disabl
e |
| (...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3614 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems | 3634 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems |
| 3615 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 | 3635 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 |
| 3616 if (hasTagName(optionTag) || hasTagName(optgroupTag)) | 3636 if (hasTagName(optionTag) || hasTagName(optgroupTag)) |
| 3617 return false; | 3637 return false; |
| 3618 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3638 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
| 3619 return false; | 3639 return false; |
| 3620 return true; | 3640 return true; |
| 3621 } | 3641 } |
| 3622 | 3642 |
| 3623 } // namespace WebCore | 3643 } // namespace WebCore |
| OLD | NEW |