OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 firstChild()->destroy(); | 51 firstChild()->destroy(); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 LayoutObject* LayoutObjectChildList::removeChildNode(LayoutObject* owner, Layout
Object* oldChild, bool notifyRenderer) | 55 LayoutObject* LayoutObjectChildList::removeChildNode(LayoutObject* owner, Layout
Object* oldChild, bool notifyRenderer) |
56 { | 56 { |
57 ASSERT(oldChild->parent() == owner); | 57 ASSERT(oldChild->parent() == owner); |
58 ASSERT(this == owner->virtualChildren()); | 58 ASSERT(this == owner->virtualChildren()); |
59 | 59 |
60 if (oldChild->isFloatingOrOutOfFlowPositioned()) | 60 if (oldChild->isFloatingOrOutOfFlowPositioned()) |
61 toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists(); | 61 toLayoutBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists(); |
62 | 62 |
63 { | 63 { |
64 // So that we'll get the appropriate dirty bit set (either that a normal
flow child got yanked or | 64 // So that we'll get the appropriate dirty bit set (either that a normal
flow child got yanked or |
65 // that a positioned child got yanked). We also issue paint invalidation
s, so that the area exposed when the child | 65 // that a positioned child got yanked). We also issue paint invalidation
s, so that the area exposed when the child |
66 // disappears gets paint invalidated properly. | 66 // disappears gets paint invalidated properly. |
67 if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->ever
HadLayout()) { | 67 if (!owner->documentBeingDestroyed() && notifyRenderer && oldChild->ever
HadLayout()) { |
68 oldChild->setNeedsLayoutAndPrefWidthsRecalc(); | 68 oldChild->setNeedsLayoutAndPrefWidthsRecalc(); |
69 invalidatePaintOnRemoval(*oldChild); | 69 invalidatePaintOnRemoval(*oldChild); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 // If we have a line box wrapper, delete it. | 73 // If we have a line box wrapper, delete it. |
74 if (oldChild->isBox()) | 74 if (oldChild->isBox()) |
75 toRenderBox(oldChild)->deleteLineBoxWrapper(); | 75 toLayoutBox(oldChild)->deleteLineBoxWrapper(); |
76 | 76 |
77 // If oldChild is the start or end of the selection, then clear the selectio
n to | 77 // If oldChild is the start or end of the selection, then clear the selectio
n to |
78 // avoid problems of invalid pointers. | 78 // avoid problems of invalid pointers. |
79 // FIXME: The FrameSelection should be responsible for this when it | 79 // FIXME: The FrameSelection should be responsible for this when it |
80 // is notified of DOM mutations. | 80 // is notified of DOM mutations. |
81 if (!owner->documentBeingDestroyed() && oldChild->isSelectionBorder()) | 81 if (!owner->documentBeingDestroyed() && oldChild->isSelectionBorder()) |
82 owner->view()->clearSelection(); | 82 owner->view()->clearSelection(); |
83 | 83 |
84 if (!owner->documentBeingDestroyed() && notifyRenderer) | 84 if (!owner->documentBeingDestroyed() && notifyRenderer) |
85 oldChild->willBeRemovedFromTree(); | 85 oldChild->willBeRemovedFromTree(); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 return; | 174 return; |
175 } | 175 } |
176 | 176 |
177 DisableCompositingQueryAsserts disabler; | 177 DisableCompositingQueryAsserts disabler; |
178 // FIXME: We should not allow paint invalidation out of paint invalidation s
tate. crbug.com/457415 | 178 // FIXME: We should not allow paint invalidation out of paint invalidation s
tate. crbug.com/457415 |
179 DisablePaintInvalidationStateAsserts paintInvalidationAssertDisabler; | 179 DisablePaintInvalidationStateAsserts paintInvalidationAssertDisabler; |
180 oldChild.invalidatePaintUsingContainer(oldChild.containerForPaintInvalidatio
n(), oldChild.previousPaintInvalidationRect(), PaintInvalidationRendererRemoval)
; | 180 oldChild.invalidatePaintUsingContainer(oldChild.containerForPaintInvalidatio
n(), oldChild.previousPaintInvalidationRect(), PaintInvalidationRendererRemoval)
; |
181 } | 181 } |
182 | 182 |
183 } // namespace blink | 183 } // namespace blink |
OLD | NEW |