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 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2111 || m_style->hasAutoZIndex() != newStyle.hasAutoZIndex(); | 2111 || m_style->hasAutoZIndex() != newStyle.hasAutoZIndex(); |
2112 if (visibilityChanged) { | 2112 if (visibilityChanged) { |
2113 document().setAnnotatedRegionsDirty(true); | 2113 document().setAnnotatedRegionsDirty(true); |
2114 if (AXObjectCache* cache = document().existingAXObjectCache()) | 2114 if (AXObjectCache* cache = document().existingAXObjectCache()) |
2115 cache->childrenChanged(parent()); | 2115 cache->childrenChanged(parent()); |
2116 } | 2116 } |
2117 | 2117 |
2118 // Keep layer hierarchy visibility bits up to date if visibility changes
. | 2118 // Keep layer hierarchy visibility bits up to date if visibility changes
. |
2119 if (m_style->visibility() != newStyle.visibility()) { | 2119 if (m_style->visibility() != newStyle.visibility()) { |
2120 // We might not have an enclosing layer yet because we might not be
in the tree. | 2120 // We might not have an enclosing layer yet because we might not be
in the tree. |
2121 if (RenderLayer* layer = enclosingLayer()) { | 2121 if (RenderLayer* layer = enclosingLayer()) |
2122 if (newStyle.visibility() == VISIBLE) { | 2122 layer->potentiallyDirtyVisibleContentStatus(newStyle.visibility(
)); |
2123 layer->setHasVisibleContent(); | |
2124 } else { | |
2125 layer->potentiallyDirtyVisibleContentStatus(newStyle.visibil
ity()); | |
2126 } | |
2127 } | |
2128 } | 2123 } |
2129 | 2124 |
2130 if (isFloating() && (m_style->floating() != newStyle.floating())) | 2125 if (isFloating() && (m_style->floating() != newStyle.floating())) |
2131 // For changes in float styles, we need to conceivably remove oursel
ves | 2126 // For changes in float styles, we need to conceivably remove oursel
ves |
2132 // from the floating objects list. | 2127 // from the floating objects list. |
2133 toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists(); | 2128 toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists(); |
2134 else if (isOutOfFlowPositioned() && (m_style->position() != newStyle.pos
ition())) | 2129 else if (isOutOfFlowPositioned() && (m_style->position() != newStyle.pos
ition())) |
2135 // For changes in positioning styles, we need to conceivably remove
ourselves | 2130 // For changes in positioning styles, we need to conceivably remove
ourselves |
2136 // from the positioned objects list. | 2131 // from the positioned objects list. |
2137 toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists(); | 2132 toRenderBox(this)->removeFloatingOrPositionedChildFromBlockLists(); |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2728 layer = parent()->enclosingLayer(); | 2723 layer = parent()->enclosingLayer(); |
2729 addLayers(layer); | 2724 addLayers(layer); |
2730 } | 2725 } |
2731 | 2726 |
2732 // If |this| is visible but this object was not, tell the layer it has some
visible content | 2727 // If |this| is visible but this object was not, tell the layer it has some
visible content |
2733 // that needs to be drawn and layer visibility optimization can't be used | 2728 // that needs to be drawn and layer visibility optimization can't be used |
2734 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V
ISIBLE && !hasLayer()) { | 2729 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V
ISIBLE && !hasLayer()) { |
2735 if (!layer) | 2730 if (!layer) |
2736 layer = parent()->enclosingLayer(); | 2731 layer = parent()->enclosingLayer(); |
2737 if (layer) | 2732 if (layer) |
2738 layer->setHasVisibleContent(); | 2733 layer->dirtyVisibleContentStatus(); |
2739 } | 2734 } |
2740 | 2735 |
2741 if (!isFloating() && parent()->childrenInline()) | 2736 if (!isFloating() && parent()->childrenInline()) |
2742 parent()->dirtyLinesFromChangedChild(this); | 2737 parent()->dirtyLinesFromChangedChild(this); |
2743 } | 2738 } |
2744 | 2739 |
2745 void RenderObject::willBeRemovedFromTree() | 2740 void RenderObject::willBeRemovedFromTree() |
2746 { | 2741 { |
2747 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal
s which would need to be fixed first. | 2742 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal
s which would need to be fixed first. |
2748 | 2743 |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3475 { | 3470 { |
3476 if (object1) { | 3471 if (object1) { |
3477 const blink::RenderObject* root = object1; | 3472 const blink::RenderObject* root = object1; |
3478 while (root->parent()) | 3473 while (root->parent()) |
3479 root = root->parent(); | 3474 root = root->parent(); |
3480 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3475 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3481 } | 3476 } |
3482 } | 3477 } |
3483 | 3478 |
3484 #endif | 3479 #endif |
OLD | NEW |