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