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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3610 if (!document().isHTMLDocument()) | 3606 if (!document().isHTMLDocument()) |
3611 return; | 3607 return; |
3612 | 3608 |
3613 if (!oldId.isEmpty()) | 3609 if (!oldId.isEmpty()) |
3614 toHTMLDocument(document()).removeExtraNamedItem(oldId); | 3610 toHTMLDocument(document()).removeExtraNamedItem(oldId); |
3615 | 3611 |
3616 if (!newId.isEmpty()) | 3612 if (!newId.isEmpty()) |
3617 toHTMLDocument(document()).addExtraNamedItem(newId); | 3613 toHTMLDocument(document()).addExtraNamedItem(newId); |
3618 } | 3614 } |
3619 | 3615 |
3620 void Element::scheduleSVGFilterLayerUpdateHack() { | |
3621 document().scheduleSVGFilterLayerUpdateHack(*this); | |
3622 } | |
3623 | |
3624 ScrollOffset Element::savedLayerScrollOffset() const { | 3616 ScrollOffset Element::savedLayerScrollOffset() const { |
3625 return hasRareData() ? elementRareData()->savedLayerScrollOffset() | 3617 return hasRareData() ? elementRareData()->savedLayerScrollOffset() |
3626 : ScrollOffset(); | 3618 : ScrollOffset(); |
3627 } | 3619 } |
3628 | 3620 |
3629 void Element::setSavedLayerScrollOffset(const ScrollOffset& size) { | 3621 void Element::setSavedLayerScrollOffset(const ScrollOffset& size) { |
3630 if (size.isZero() && !hasRareData()) | 3622 if (size.isZero() && !hasRareData()) |
3631 return; | 3623 return; |
3632 ensureElementRareData().setSavedLayerScrollOffset(size); | 3624 ensureElementRareData().setSavedLayerScrollOffset(size); |
3633 } | 3625 } |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4088 } | 4080 } |
4089 | 4081 |
4090 DEFINE_TRACE_WRAPPERS(Element) { | 4082 DEFINE_TRACE_WRAPPERS(Element) { |
4091 if (hasRareData()) { | 4083 if (hasRareData()) { |
4092 visitor->traceWrappers(elementRareData()); | 4084 visitor->traceWrappers(elementRareData()); |
4093 } | 4085 } |
4094 ContainerNode::traceWrappers(visitor); | 4086 ContainerNode::traceWrappers(visitor); |
4095 } | 4087 } |
4096 | 4088 |
4097 } // namespace blink | 4089 } // namespace blink |
OLD | NEW |