| 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 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 DCHECK(newStyle); | 1771 DCHECK(newStyle); |
| 1772 | 1772 |
| 1773 StyleRecalcChange localChange = ComputedStyle::stylePropagationDiff(oldStyle
.get(), newStyle.get()); | 1773 StyleRecalcChange localChange = ComputedStyle::stylePropagationDiff(oldStyle
.get(), newStyle.get()); |
| 1774 if (localChange == NoChange) { | 1774 if (localChange == NoChange) { |
| 1775 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), stylesUnchanged,
1); | 1775 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), stylesUnchanged,
1); |
| 1776 } else { | 1776 } else { |
| 1777 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), stylesChanged, 1
); | 1777 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), stylesChanged, 1
); |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 if (localChange == Reattach) { | 1780 if (localChange == Reattach) { |
| 1781 // TODO(nainar): Remove the style parameter being passed into buildOwnLa
yout(). | 1781 // TODO(nainar): Remove the style parameter being passed into buildLayou
tTree(). |
| 1782 // ComputedStyle will now be stored on Node and accessed in buildOwnLayo
ut() | 1782 // ComputedStyle will now be stored on Node and accessed in buildLayoutT
ree() |
| 1783 // using mutableComputedStyle(). | 1783 // using mutableComputedStyle(). |
| 1784 return buildOwnLayout(*newStyle); | 1784 return buildLayoutTree(*newStyle); |
| 1785 } | 1785 } |
| 1786 | 1786 |
| 1787 DCHECK(oldStyle); | 1787 DCHECK(oldStyle); |
| 1788 | 1788 |
| 1789 if (localChange != NoChange) | 1789 if (localChange != NoChange) |
| 1790 updateCallbackSelectors(oldStyle.get(), newStyle.get()); | 1790 updateCallbackSelectors(oldStyle.get(), newStyle.get()); |
| 1791 | 1791 |
| 1792 if (LayoutObject* layoutObject = this->layoutObject()) { | 1792 if (LayoutObject* layoutObject = this->layoutObject()) { |
| 1793 if (localChange != NoChange || pseudoStyleCacheIsInvalid(oldStyle.get(),
newStyle.get()) || svgFilterNeedsLayerUpdate()) { | 1793 if (localChange != NoChange || pseudoStyleCacheIsInvalid(oldStyle.get(),
newStyle.get()) || svgFilterNeedsLayerUpdate()) { |
| 1794 layoutObject->setStyle(newStyle.get()); | 1794 layoutObject->setStyle(newStyle.get()); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1813 return Inherit; | 1813 return Inherit; |
| 1814 newStyle->copyChildDependentFlagsFrom(*oldStyle); | 1814 newStyle->copyChildDependentFlagsFrom(*oldStyle); |
| 1815 } | 1815 } |
| 1816 if (oldStyle->hasPseudoElementStyle() || newStyle->hasPseudoElementStyle
()) | 1816 if (oldStyle->hasPseudoElementStyle() || newStyle->hasPseudoElementStyle
()) |
| 1817 return UpdatePseudoElements; | 1817 return UpdatePseudoElements; |
| 1818 } | 1818 } |
| 1819 | 1819 |
| 1820 return localChange; | 1820 return localChange; |
| 1821 } | 1821 } |
| 1822 | 1822 |
| 1823 StyleRecalcChange Element::buildOwnLayout(ComputedStyle& newStyle) | 1823 StyleRecalcChange Element::buildLayoutTree(ComputedStyle& newStyle) |
| 1824 { | 1824 { |
| 1825 AttachContext reattachContext; | 1825 AttachContext reattachContext; |
| 1826 reattachContext.resolvedStyle = &newStyle; | 1826 reattachContext.resolvedStyle = &newStyle; |
| 1827 bool layoutObjectWillChange = needsAttach() || layoutObject(); | 1827 bool layoutObjectWillChange = needsAttach() || layoutObject(); |
| 1828 reattach(reattachContext); | 1828 reattach(reattachContext); |
| 1829 if (layoutObjectWillChange || layoutObject()) | 1829 if (layoutObjectWillChange || layoutObject()) |
| 1830 return Reattach; | 1830 return Reattach; |
| 1831 return ReattachNoLayoutObject; | 1831 return ReattachNoLayoutObject; |
| 1832 } | 1832 } |
| 1833 | 1833 |
| (...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3745 | 3745 |
| 3746 DEFINE_TRACE_WRAPPERS(Element) | 3746 DEFINE_TRACE_WRAPPERS(Element) |
| 3747 { | 3747 { |
| 3748 if (hasRareData()) { | 3748 if (hasRareData()) { |
| 3749 visitor->traceWrappers(elementRareData()); | 3749 visitor->traceWrappers(elementRareData()); |
| 3750 } | 3750 } |
| 3751 ContainerNode::traceWrappers(visitor); | 3751 ContainerNode::traceWrappers(visitor); |
| 3752 } | 3752 } |
| 3753 | 3753 |
| 3754 } // namespace blink | 3754 } // namespace blink |
| OLD | NEW |