| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/rendering/RenderObjectChildList.h" | 28 #include "core/rendering/RenderObjectChildList.h" |
| 29 | 29 |
| 30 #include "core/rendering/RenderObject.h" | 30 #include "core/rendering/RenderObject.h" |
| 31 #include "core/rendering/RenderView.h" | 31 #include "core/rendering/RenderView.h" |
| 32 #include "core/rendering/style/RenderStyle.h" | 32 #include "core/rendering/style/RenderStyle.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 void RenderObjectChildList::trace(Visitor* visitor) | |
| 37 { | |
| 38 visitor->trace(m_firstChild); | |
| 39 visitor->trace(m_lastChild); | |
| 40 } | |
| 41 | |
| 42 void RenderObjectChildList::destroyLeftoverChildren() | 36 void RenderObjectChildList::destroyLeftoverChildren() |
| 43 { | 37 { |
| 44 while (firstChild()) { | 38 while (firstChild()) { |
| 45 // 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. | 39 // 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. |
| 46 // FIXME(sky): This should never happen now. | 40 // FIXME(sky): This should never happen now. |
| 47 if (firstChild()->node()) | 41 if (firstChild()->node()) |
| 48 firstChild()->node()->setRenderer(0); | 42 firstChild()->node()->setRenderer(0); |
| 49 firstChild()->destroy(); | 43 firstChild()->destroy(); |
| 50 } | 44 } |
| 51 } | 45 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 135 |
| 142 if (!owner->documentBeingDestroyed() && notifyRenderer) | 136 if (!owner->documentBeingDestroyed() && notifyRenderer) |
| 143 newChild->insertedIntoTree(); | 137 newChild->insertedIntoTree(); |
| 144 | 138 |
| 145 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | 139 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
| 146 if (!owner->normalChildNeedsLayout()) | 140 if (!owner->normalChildNeedsLayout()) |
| 147 owner->setChildNeedsLayout(); // We may supply the static position for a
n absolute positioned child. | 141 owner->setChildNeedsLayout(); // We may supply the static position for a
n absolute positioned child. |
| 148 } | 142 } |
| 149 | 143 |
| 150 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |