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