| 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. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 9 * (C) 2007 Eric Seidel (eric@webkit.org) | 9 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 10 * | 10 * |
| (...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1739 if (isHovered()) | 1739 if (isHovered()) |
| 1740 document().hoveredNodeDetached(*this); | 1740 document().hoveredNodeDetached(*this); |
| 1741 if (inActiveChain()) | 1741 if (inActiveChain()) |
| 1742 document().activeChainNodeDetached(*this); | 1742 document().activeChainNodeDetached(*this); |
| 1743 document().userActionElements().didDetach(*this); | 1743 document().userActionElements().didDetach(*this); |
| 1744 } | 1744 } |
| 1745 | 1745 |
| 1746 if (context.clearInvalidation) | 1746 if (context.clearInvalidation) |
| 1747 document().styleEngine().styleInvalidator().clearInvalidation(*this); | 1747 document().styleEngine().styleInvalidator().clearInvalidation(*this); |
| 1748 | 1748 |
| 1749 if (svgFilterNeedsLayerUpdate()) | |
| 1750 document().unscheduleSVGFilterLayerUpdateHack(*this); | |
| 1751 | |
| 1752 setNeedsResizeObserverUpdate(); | 1749 setNeedsResizeObserverUpdate(); |
| 1753 | 1750 |
| 1754 DCHECK(needsAttach()); | 1751 DCHECK(needsAttach()); |
| 1755 } | 1752 } |
| 1756 | 1753 |
| 1757 bool Element::pseudoStyleCacheIsInvalid(const ComputedStyle* currentStyle, | 1754 bool Element::pseudoStyleCacheIsInvalid(const ComputedStyle* currentStyle, |
| 1758 ComputedStyle* newStyle) { | 1755 ComputedStyle* newStyle) { |
| 1759 DCHECK_EQ(currentStyle, computedStyle()); | 1756 DCHECK_EQ(currentStyle, computedStyle()); |
| 1760 DCHECK(layoutObject()); | 1757 DCHECK(layoutObject()); |
| 1761 | 1758 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 return rebuildLayoutTree(); | 1943 return rebuildLayoutTree(); |
| 1947 } | 1944 } |
| 1948 | 1945 |
| 1949 DCHECK(oldStyle); | 1946 DCHECK(oldStyle); |
| 1950 | 1947 |
| 1951 if (localChange != NoChange) | 1948 if (localChange != NoChange) |
| 1952 updateCallbackSelectors(oldStyle.get(), newStyle.get()); | 1949 updateCallbackSelectors(oldStyle.get(), newStyle.get()); |
| 1953 | 1950 |
| 1954 if (LayoutObject* layoutObject = this->layoutObject()) { | 1951 if (LayoutObject* layoutObject = this->layoutObject()) { |
| 1955 if (localChange != NoChange || | 1952 if (localChange != NoChange || |
| 1956 pseudoStyleCacheIsInvalid(oldStyle.get(), newStyle.get()) || | 1953 pseudoStyleCacheIsInvalid(oldStyle.get(), newStyle.get())) { |
| 1957 svgFilterNeedsLayerUpdate()) { | |
| 1958 layoutObject->setStyle(newStyle.get()); | 1954 layoutObject->setStyle(newStyle.get()); |
| 1959 } else { | 1955 } else { |
| 1960 // Although no change occurred, we use the new style so that the cousin | 1956 // Although no change occurred, we use the new style so that the cousin |
| 1961 // style sharing code won't get fooled into believing this style is the | 1957 // style sharing code won't get fooled into believing this style is the |
| 1962 // same. | 1958 // same. |
| 1963 // FIXME: We may be able to remove this hack, see discussion in | 1959 // FIXME: We may be able to remove this hack, see discussion in |
| 1964 // https://codereview.chromium.org/30453002/ | 1960 // https://codereview.chromium.org/30453002/ |
| 1965 layoutObject->setStyleInternal(newStyle.get()); | 1961 layoutObject->setStyleInternal(newStyle.get()); |
| 1966 } | 1962 } |
| 1967 } | 1963 } |
| (...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3611 if (!document().isHTMLDocument()) | 3607 if (!document().isHTMLDocument()) |
| 3612 return; | 3608 return; |
| 3613 | 3609 |
| 3614 if (!oldId.isEmpty()) | 3610 if (!oldId.isEmpty()) |
| 3615 toHTMLDocument(document()).removeExtraNamedItem(oldId); | 3611 toHTMLDocument(document()).removeExtraNamedItem(oldId); |
| 3616 | 3612 |
| 3617 if (!newId.isEmpty()) | 3613 if (!newId.isEmpty()) |
| 3618 toHTMLDocument(document()).addExtraNamedItem(newId); | 3614 toHTMLDocument(document()).addExtraNamedItem(newId); |
| 3619 } | 3615 } |
| 3620 | 3616 |
| 3621 void Element::scheduleSVGFilterLayerUpdateHack() { | |
| 3622 document().scheduleSVGFilterLayerUpdateHack(*this); | |
| 3623 } | |
| 3624 | |
| 3625 ScrollOffset Element::savedLayerScrollOffset() const { | 3617 ScrollOffset Element::savedLayerScrollOffset() const { |
| 3626 return hasRareData() ? elementRareData()->savedLayerScrollOffset() | 3618 return hasRareData() ? elementRareData()->savedLayerScrollOffset() |
| 3627 : ScrollOffset(); | 3619 : ScrollOffset(); |
| 3628 } | 3620 } |
| 3629 | 3621 |
| 3630 void Element::setSavedLayerScrollOffset(const ScrollOffset& size) { | 3622 void Element::setSavedLayerScrollOffset(const ScrollOffset& size) { |
| 3631 if (size.isZero() && !hasRareData()) | 3623 if (size.isZero() && !hasRareData()) |
| 3632 return; | 3624 return; |
| 3633 ensureElementRareData().setSavedLayerScrollOffset(size); | 3625 ensureElementRareData().setSavedLayerScrollOffset(size); |
| 3634 } | 3626 } |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4089 } | 4081 } |
| 4090 | 4082 |
| 4091 DEFINE_TRACE_WRAPPERS(Element) { | 4083 DEFINE_TRACE_WRAPPERS(Element) { |
| 4092 if (hasRareData()) { | 4084 if (hasRareData()) { |
| 4093 visitor->traceWrappers(elementRareData()); | 4085 visitor->traceWrappers(elementRareData()); |
| 4094 } | 4086 } |
| 4095 ContainerNode::traceWrappers(visitor); | 4087 ContainerNode::traceWrappers(visitor); |
| 4096 } | 4088 } |
| 4097 | 4089 |
| 4098 } // namespace blink | 4090 } // namespace blink |
| OLD | NEW |