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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
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 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1639 { | 1639 { |
1640 view()->selectionStartEnd(spos, epos); | 1640 view()->selectionStartEnd(spos, epos); |
1641 } | 1641 } |
1642 | 1642 |
1643 void RenderObject::handleDynamicFloatPositionChange() | 1643 void RenderObject::handleDynamicFloatPositionChange() |
1644 { | 1644 { |
1645 // FIXME(sky): Inline this function. | 1645 // FIXME(sky): Inline this function. |
1646 | 1646 |
1647 // We have gone from not affecting the inline status of the parent flow to s uddenly | 1647 // We have gone from not affecting the inline status of the parent flow to s uddenly |
1648 // having an impact. See if there is a mismatch between the parent flow's | 1648 // having an impact. See if there is a mismatch between the parent flow's |
1649 // childrenInline() state and our state. | 1649 // isRenderParagraph() state and our state. |
ojan
2014/11/21 22:55:10
This comment doesn't really make sense anymore sin
rafaelw
2014/11/21 23:13:54
Done.
| |
1650 setInline(style()->isDisplayInlineType()); | 1650 setInline(style()->isDisplayInlineType()); |
1651 ASSERT(isInline() == parent()->childrenInline()); | 1651 ASSERT(isInline() == parent()->isRenderParagraph()); |
1652 } | 1652 } |
1653 | 1653 |
1654 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff) const | 1654 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff) const |
1655 { | 1655 { |
1656 // If transform changed, and the layer does not paint into its own separate backing, then we need to invalidate paints. | 1656 // If transform changed, and the layer does not paint into its own separate backing, then we need to invalidate paints. |
1657 if (diff.transformChanged()) { | 1657 if (diff.transformChanged()) { |
1658 // Text nodes share style with their parents but transforms don't apply to them, | 1658 // Text nodes share style with their parents but transforms don't apply to them, |
1659 // hence the !isText() check. | 1659 // hence the !isText() check. |
1660 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer( )->hasStyleDeterminedDirectCompositingReasons())) | 1660 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer( )->hasStyleDeterminedDirectCompositingReasons())) |
1661 diff.setNeedsPaintInvalidationLayer(); | 1661 diff.setNeedsPaintInvalidationLayer(); |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2171 // FIXME: We should ASSERT(isRooted()) here but generated content makes some out-of-order insertion. | 2171 // FIXME: We should ASSERT(isRooted()) here but generated content makes some out-of-order insertion. |
2172 | 2172 |
2173 // Keep our layer hierarchy updated. Optimize for the common case where we d on't have any children | 2173 // Keep our layer hierarchy updated. Optimize for the common case where we d on't have any children |
2174 // and don't have a layer attached to ourselves. | 2174 // and don't have a layer attached to ourselves. |
2175 RenderLayer* layer = 0; | 2175 RenderLayer* layer = 0; |
2176 if (slowFirstChild() || hasLayer()) { | 2176 if (slowFirstChild() || hasLayer()) { |
2177 layer = parent()->enclosingLayer(); | 2177 layer = parent()->enclosingLayer(); |
2178 addLayers(layer); | 2178 addLayers(layer); |
2179 } | 2179 } |
2180 | 2180 |
2181 if (parent()->childrenInline()) | 2181 if (parent()->isRenderParagraph()) |
2182 parent()->dirtyLinesFromChangedChild(this); | 2182 parent()->dirtyLinesFromChangedChild(this); |
2183 } | 2183 } |
2184 | 2184 |
2185 void RenderObject::willBeRemovedFromTree() | 2185 void RenderObject::willBeRemovedFromTree() |
2186 { | 2186 { |
2187 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first. | 2187 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first. |
2188 | 2188 |
2189 // Keep our layer hierarchy updated. | 2189 // Keep our layer hierarchy updated. |
2190 if (slowFirstChild() || hasLayer()) | 2190 if (slowFirstChild() || hasLayer()) |
2191 removeLayers(parent()->enclosingLayer()); | 2191 removeLayers(parent()->enclosingLayer()); |
2192 | 2192 |
2193 if (isOutOfFlowPositioned() && parent()->childrenInline()) | 2193 if (isOutOfFlowPositioned() && parent()->isRenderParagraph()) |
2194 parent()->dirtyLinesFromChangedChild(this); | 2194 parent()->dirtyLinesFromChangedChild(this); |
2195 } | 2195 } |
2196 | 2196 |
2197 void RenderObject::destroyAndCleanupAnonymousWrappers() | 2197 void RenderObject::destroyAndCleanupAnonymousWrappers() |
2198 { | 2198 { |
2199 // If the tree is destroyed, there is no need for a clean-up phase. | 2199 // If the tree is destroyed, there is no need for a clean-up phase. |
2200 if (documentBeingDestroyed()) { | 2200 if (documentBeingDestroyed()) { |
2201 destroy(); | 2201 destroy(); |
2202 return; | 2202 return; |
2203 } | 2203 } |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2610 { | 2610 { |
2611 if (object1) { | 2611 if (object1) { |
2612 const blink::RenderObject* root = object1; | 2612 const blink::RenderObject* root = object1; |
2613 while (root->parent()) | 2613 while (root->parent()) |
2614 root = root->parent(); | 2614 root = root->parent(); |
2615 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2615 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
2616 } | 2616 } |
2617 } | 2617 } |
2618 | 2618 |
2619 #endif | 2619 #endif |
OLD | NEW |