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 17 matching lines...) Expand all Loading... |
28 #include "core/rendering/RenderObjectChildList.h" | 28 #include "core/rendering/RenderObjectChildList.h" |
29 | 29 |
30 #include "core/accessibility/AXObjectCache.h" | 30 #include "core/accessibility/AXObjectCache.h" |
31 #include "core/rendering/RenderCounter.h" | 31 #include "core/rendering/RenderCounter.h" |
32 #include "core/rendering/RenderObject.h" | 32 #include "core/rendering/RenderObject.h" |
33 #include "core/rendering/RenderView.h" | 33 #include "core/rendering/RenderView.h" |
34 #include "core/rendering/style/RenderStyle.h" | 34 #include "core/rendering/style/RenderStyle.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 void RenderObjectChildList::trace(Visitor* visitor) | |
39 { | |
40 visitor->trace(m_firstChild); | |
41 visitor->trace(m_lastChild); | |
42 } | |
43 | |
44 void RenderObjectChildList::destroyLeftoverChildren() | 38 void RenderObjectChildList::destroyLeftoverChildren() |
45 { | 39 { |
46 while (firstChild()) { | 40 while (firstChild()) { |
47 if (firstChild()->isListMarker() || (firstChild()->style()->styleType()
== FIRST_LETTER && !firstChild()->isText())) { | 41 if (firstChild()->isListMarker() || (firstChild()->style()->styleType()
== FIRST_LETTER && !firstChild()->isText())) { |
48 firstChild()->remove(); // List markers are owned by their enclosin
g list and so don't get destroyed by this container. Similarly, first letters ar
e destroyed by their remaining text fragment. | 42 firstChild()->remove(); // List markers are owned by their enclosin
g list and so don't get destroyed by this container. Similarly, first letters ar
e destroyed by their remaining text fragment. |
49 } else { | 43 } else { |
50 // 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. | 44 // 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 if (firstChild()->node()) | 45 if (firstChild()->node()) |
52 firstChild()->node()->setRenderer(0); | 46 firstChild()->node()->setRenderer(0); |
53 firstChild()->destroy(); | 47 firstChild()->destroy(); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 160 |
167 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | 161 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
168 if (!owner->normalChildNeedsLayout()) | 162 if (!owner->normalChildNeedsLayout()) |
169 owner->setChildNeedsLayout(); // We may supply the static position for a
n absolute positioned child. | 163 owner->setChildNeedsLayout(); // We may supply the static position for a
n absolute positioned child. |
170 | 164 |
171 if (AXObjectCache* cache = owner->document().axObjectCache()) | 165 if (AXObjectCache* cache = owner->document().axObjectCache()) |
172 cache->childrenChanged(owner); | 166 cache->childrenChanged(owner); |
173 } | 167 } |
174 | 168 |
175 } // namespace blink | 169 } // namespace blink |
OLD | NEW |