| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 void RenderObjectChildList::trace(Visitor* visitor) | 39 void RenderObjectChildList::trace(Visitor* visitor) |
| 40 { | 40 { |
| 41 visitor->trace(m_firstChild); | 41 visitor->trace(m_firstChild); |
| 42 visitor->trace(m_lastChild); | 42 visitor->trace(m_lastChild); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void RenderObjectChildList::destroyLeftoverChildren() | 45 void RenderObjectChildList::destroyLeftoverChildren() |
| 46 { | 46 { |
| 47 while (firstChild()) { | 47 while (firstChild()) { |
| 48 if (firstChild()->isListMarker() || (firstChild()->style()->styleType()
== FIRST_LETTER && !firstChild()->isText())) { | 48 // List markers are owned by their enclosing list and so don't get destr
oyed by this container. |
| 49 firstChild()->remove(); // List markers are owned by their enclosing
list and so don't get destroyed by this container. Similarly, first letters are
destroyed by their remaining text fragment. | 49 if (firstChild()->isListMarker()) { |
| 50 } else { | 50 firstChild()->remove(); |
| 51 // Destroy any anonymous children remaining in the render tree, as w
ell as implicit (shadow) DOM elements like those used in the engine-based text f
ields. | 51 continue; |
| 52 if (firstChild()->node()) | |
| 53 firstChild()->node()->setRenderer(0); | |
| 54 firstChild()->destroy(); | |
| 55 } | 52 } |
| 53 |
| 54 // Destroy any anonymous children remaining in the render tree, as well
as implicit (shadow) DOM elements like those used in the engine-based text field
s. |
| 55 if (firstChild()->node()) |
| 56 firstChild()->node()->setRenderer(0); |
| 57 firstChild()->destroy(); |
| 56 } | 58 } |
| 57 } | 59 } |
| 58 | 60 |
| 59 RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render
Object* oldChild, bool notifyRenderer) | 61 RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render
Object* oldChild, bool notifyRenderer) |
| 60 { | 62 { |
| 61 ASSERT(oldChild->parent() == owner); | 63 ASSERT(oldChild->parent() == owner); |
| 62 | 64 |
| 63 if (oldChild->isFloatingOrOutOfFlowPositioned()) | 65 if (oldChild->isFloatingOrOutOfFlowPositioned()) |
| 64 toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists(); | 66 toRenderBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists(); |
| 65 | 67 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 return; | 178 return; |
| 177 if (oldChild.isBody()) { | 179 if (oldChild.isBody()) { |
| 178 oldChild.view()->setShouldDoFullPaintInvalidation(); | 180 oldChild.view()->setShouldDoFullPaintInvalidation(); |
| 179 return; | 181 return; |
| 180 } | 182 } |
| 181 DisableCompositingQueryAsserts disabler; | 183 DisableCompositingQueryAsserts disabler; |
| 182 oldChild.invalidatePaintUsingContainer(oldChild.containerForPaintInvalidatio
n(), oldChild.previousPaintInvalidationRect(), PaintInvalidationRendererRemoval)
; | 184 oldChild.invalidatePaintUsingContainer(oldChild.containerForPaintInvalidatio
n(), oldChild.previousPaintInvalidationRect(), PaintInvalidationRendererRemoval)
; |
| 183 } | 185 } |
| 184 | 186 |
| 185 } // namespace blink | 187 } // namespace blink |
| OLD | NEW |