| 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 | 364 |
| 365 bool Element::hasAnimations() const | 365 bool Element::hasAnimations() const |
| 366 { | 366 { |
| 367 if (!hasRareData()) | 367 if (!hasRareData()) |
| 368 return false; | 368 return false; |
| 369 | 369 |
| 370 ElementAnimations* elementAnimations = elementRareData()->elementAnimations(
); | 370 ElementAnimations* elementAnimations = elementRareData()->elementAnimations(
); |
| 371 return elementAnimations && !elementAnimations->isEmpty(); | 371 return elementAnimations && !elementAnimations->isEmpty(); |
| 372 } | 372 } |
| 373 | 373 |
| 374 Node::NodeType Element::nodeType() const | 374 Node::NodeType Element::getNodeType() const |
| 375 { | 375 { |
| 376 return ELEMENT_NODE; | 376 return ELEMENT_NODE; |
| 377 } | 377 } |
| 378 | 378 |
| 379 bool Element::hasAttribute(const QualifiedName& name) const | 379 bool Element::hasAttribute(const QualifiedName& name) const |
| 380 { | 380 { |
| 381 return hasAttributeNS(name.namespaceURI(), name.localName()); | 381 return hasAttributeNS(name.namespaceURI(), name.localName()); |
| 382 } | 382 } |
| 383 | 383 |
| 384 void Element::synchronizeAllAttributes() const | 384 void Element::synchronizeAllAttributes() const |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 data->intersectionObserverData()->deactivateAllIntersectionObservers
(*this); | 1508 data->intersectionObserverData()->deactivateAllIntersectionObservers
(*this); |
| 1509 } | 1509 } |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 void Element::attach(const AttachContext& context) | 1512 void Element::attach(const AttachContext& context) |
| 1513 { | 1513 { |
| 1514 ASSERT(document().inStyleRecalc()); | 1514 ASSERT(document().inStyleRecalc()); |
| 1515 | 1515 |
| 1516 // We've already been through detach when doing an attach, but we might | 1516 // We've already been through detach when doing an attach, but we might |
| 1517 // need to clear any state that's been added since then. | 1517 // need to clear any state that's been added since then. |
| 1518 if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) { | 1518 if (hasRareData() && getStyleChangeType() == NeedsReattachStyleChange) { |
| 1519 ElementRareData* data = elementRareData(); | 1519 ElementRareData* data = elementRareData(); |
| 1520 data->clearComputedStyle(); | 1520 data->clearComputedStyle(); |
| 1521 } | 1521 } |
| 1522 | 1522 |
| 1523 if (!isSlotOrActiveInsertionPoint()) | 1523 if (!isSlotOrActiveInsertionPoint()) |
| 1524 LayoutTreeBuilderForElement(*this, context.resolvedStyle).createLayoutOb
jectIfNeeded(); | 1524 LayoutTreeBuilderForElement(*this, context.resolvedStyle).createLayoutOb
jectIfNeeded(); |
| 1525 | 1525 |
| 1526 addCallbackSelectors(); | 1526 addCallbackSelectors(); |
| 1527 | 1527 |
| 1528 if (hasRareData() && !layoutObject()) { | 1528 if (hasRareData() && !layoutObject()) { |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 layoutObject->setStyle(newStyle.get()); | 1772 layoutObject->setStyle(newStyle.get()); |
| 1773 } else { | 1773 } else { |
| 1774 // Although no change occurred, we use the new style so that the cou
sin style sharing code won't get | 1774 // Although no change occurred, we use the new style so that the cou
sin style sharing code won't get |
| 1775 // fooled into believing this style is the same. | 1775 // fooled into believing this style is the same. |
| 1776 // FIXME: We may be able to remove this hack, see discussion in | 1776 // FIXME: We may be able to remove this hack, see discussion in |
| 1777 // https://codereview.chromium.org/30453002/ | 1777 // https://codereview.chromium.org/30453002/ |
| 1778 layoutObject->setStyleInternal(newStyle.get()); | 1778 layoutObject->setStyleInternal(newStyle.get()); |
| 1779 } | 1779 } |
| 1780 } | 1780 } |
| 1781 | 1781 |
| 1782 if (styleChangeType() >= SubtreeStyleChange) | 1782 if (getStyleChangeType() >= SubtreeStyleChange) |
| 1783 return Force; | 1783 return Force; |
| 1784 | 1784 |
| 1785 if (change > Inherit || localChange > Inherit) | 1785 if (change > Inherit || localChange > Inherit) |
| 1786 return max(localChange, change); | 1786 return max(localChange, change); |
| 1787 | 1787 |
| 1788 if (localChange < Inherit) { | 1788 if (localChange < Inherit) { |
| 1789 if (oldStyle->hasChildDependentFlags()) { | 1789 if (oldStyle->hasChildDependentFlags()) { |
| 1790 if (childNeedsStyleRecalc()) | 1790 if (childNeedsStyleRecalc()) |
| 1791 return Inherit; | 1791 return Inherit; |
| 1792 newStyle->copyChildDependentFlagsFrom(*oldStyle); | 1792 newStyle->copyChildDependentFlagsFrom(*oldStyle); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 void Element::clearAnimationStyleChange() | 1853 void Element::clearAnimationStyleChange() |
| 1854 { | 1854 { |
| 1855 if (!hasRareData()) | 1855 if (!hasRareData()) |
| 1856 return; | 1856 return; |
| 1857 if (ElementAnimations* elementAnimations = elementRareData()->elementAnimati
ons()) | 1857 if (ElementAnimations* elementAnimations = elementRareData()->elementAnimati
ons()) |
| 1858 elementAnimations->setAnimationStyleChange(false); | 1858 elementAnimations->setAnimationStyleChange(false); |
| 1859 } | 1859 } |
| 1860 | 1860 |
| 1861 void Element::setNeedsAnimationStyleRecalc() | 1861 void Element::setNeedsAnimationStyleRecalc() |
| 1862 { | 1862 { |
| 1863 if (styleChangeType() != NoStyleChange) | 1863 if (getStyleChangeType() != NoStyleChange) |
| 1864 return; | 1864 return; |
| 1865 | 1865 |
| 1866 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St
yleChangeReason::Animation)); | 1866 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St
yleChangeReason::Animation)); |
| 1867 setAnimationStyleChange(true); | 1867 setAnimationStyleChange(true); |
| 1868 } | 1868 } |
| 1869 | 1869 |
| 1870 void Element::setNeedsCompositingUpdate() | 1870 void Element::setNeedsCompositingUpdate() |
| 1871 { | 1871 { |
| 1872 if (!document().isActive()) | 1872 if (!document().isActive()) |
| 1873 return; | 1873 return; |
| (...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3640 { | 3640 { |
| 3641 #if ENABLE(OILPAN) | 3641 #if ENABLE(OILPAN) |
| 3642 if (hasRareData()) | 3642 if (hasRareData()) |
| 3643 visitor->trace(elementRareData()); | 3643 visitor->trace(elementRareData()); |
| 3644 visitor->trace(m_elementData); | 3644 visitor->trace(m_elementData); |
| 3645 #endif | 3645 #endif |
| 3646 ContainerNode::trace(visitor); | 3646 ContainerNode::trace(visitor); |
| 3647 } | 3647 } |
| 3648 | 3648 |
| 3649 } // namespace blink | 3649 } // namespace blink |
| OLD | NEW |