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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 RenderObject* lChild = lastChild(); | 131 RenderObject* lChild = lastChild(); |
132 | 132 |
133 if (lChild) { | 133 if (lChild) { |
134 newChild->setPreviousSibling(lChild); | 134 newChild->setPreviousSibling(lChild); |
135 lChild->setNextSibling(newChild); | 135 lChild->setNextSibling(newChild); |
136 } else | 136 } else |
137 setFirstChild(newChild); | 137 setFirstChild(newChild); |
138 | 138 |
139 setLastChild(newChild); | 139 setLastChild(newChild); |
140 | 140 |
141 if (notifyRenderer) | 141 if (!owner->documentBeingDestroyed() && notifyRenderer) |
142 newChild->insertedIntoTree(); | 142 newChild->insertedIntoTree(); |
143 | 143 |
144 if (!owner->documentBeingDestroyed()) { | 144 if (!owner->documentBeingDestroyed()) { |
145 RenderCounter::rendererSubtreeAttached(newChild); | 145 RenderCounter::rendererSubtreeAttached(newChild); |
146 } | 146 } |
147 newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing blo
ck hierarchy. | 147 newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing blo
ck hierarchy. |
148 if (!owner->normalChildNeedsLayout()) | 148 if (!owner->normalChildNeedsLayout()) |
149 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. | 149 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. |
150 | 150 |
151 if (AXObjectCache::accessibilityEnabled()) | 151 if (AXObjectCache::accessibilityEnabled()) |
(...skipping 19 matching lines...) Expand all Loading... |
171 | 171 |
172 RenderObject* prev = beforeChild->previousSibling(); | 172 RenderObject* prev = beforeChild->previousSibling(); |
173 child->setNextSibling(beforeChild); | 173 child->setNextSibling(beforeChild); |
174 beforeChild->setPreviousSibling(child); | 174 beforeChild->setPreviousSibling(child); |
175 if (prev) | 175 if (prev) |
176 prev->setNextSibling(child); | 176 prev->setNextSibling(child); |
177 child->setPreviousSibling(prev); | 177 child->setPreviousSibling(prev); |
178 | 178 |
179 child->setParent(owner); | 179 child->setParent(owner); |
180 | 180 |
181 if (notifyRenderer) | 181 if (!owner->documentBeingDestroyed() && notifyRenderer) |
182 child->insertedIntoTree(); | 182 child->insertedIntoTree(); |
183 | 183 |
184 if (!owner->documentBeingDestroyed()) { | 184 if (!owner->documentBeingDestroyed()) { |
185 RenderCounter::rendererSubtreeAttached(child); | 185 RenderCounter::rendererSubtreeAttached(child); |
186 } | 186 } |
187 child->setNeedsLayoutAndPrefWidthsRecalc(); | 187 child->setNeedsLayoutAndPrefWidthsRecalc(); |
188 if (!owner->normalChildNeedsLayout()) | 188 if (!owner->normalChildNeedsLayout()) |
189 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. | 189 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. |
190 | 190 |
191 if (AXObjectCache::accessibilityEnabled()) | 191 if (AXObjectCache::accessibilityEnabled()) |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 if (!generatedContentContainer) | 467 if (!generatedContentContainer) |
468 return; | 468 return; |
469 | 469 |
470 // Handle placement of run-ins. We do the run-in placement at the end since
generatedContentContainer can get destroyed. | 470 // Handle placement of run-ins. We do the run-in placement at the end since
generatedContentContainer can get destroyed. |
471 RenderObject* generatedContentContainerImmediateParent = generatedContentCon
tainer->parent(); | 471 RenderObject* generatedContentContainerImmediateParent = generatedContentCon
tainer->parent(); |
472 if (generatedContentContainerImmediateParent->isRenderBlock()) | 472 if (generatedContentContainerImmediateParent->isRenderBlock()) |
473 toRenderBlock(generatedContentContainerImmediateParent)->placeRunInIfNee
ded(generatedContentContainer, PlaceGeneratedRunIn); | 473 toRenderBlock(generatedContentContainerImmediateParent)->placeRunInIfNee
ded(generatedContentContainer, PlaceGeneratedRunIn); |
474 } | 474 } |
475 | 475 |
476 } // namespace WebCore | 476 } // namespace WebCore |
OLD | NEW |