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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 if (firstChild() == oldChild) | 122 if (firstChild() == oldChild) |
123 setFirstChild(oldChild->nextSibling()); | 123 setFirstChild(oldChild->nextSibling()); |
124 if (lastChild() == oldChild) | 124 if (lastChild() == oldChild) |
125 setLastChild(oldChild->previousSibling()); | 125 setLastChild(oldChild->previousSibling()); |
126 | 126 |
127 oldChild->setPreviousSibling(0); | 127 oldChild->setPreviousSibling(0); |
128 oldChild->setNextSibling(0); | 128 oldChild->setNextSibling(0); |
129 oldChild->setParent(0); | 129 oldChild->setParent(0); |
130 | 130 |
| 131 if (oldChild->m_hasCounterNodeMap) |
| 132 RenderCounter::destroyCounterNodes(oldChild); |
| 133 |
131 if (AXObjectCache::accessibilityEnabled()) | 134 if (AXObjectCache::accessibilityEnabled()) |
132 owner->document()->axObjectCache()->childrenChanged(owner); | 135 owner->document()->axObjectCache()->childrenChanged(owner); |
133 | 136 |
134 return oldChild; | 137 return oldChild; |
135 } | 138 } |
136 | 139 |
137 void RenderObjectChildList::appendChildNode(RenderObject* owner, RenderObject* n
ewChild, bool fullAppend) | 140 void RenderObjectChildList::appendChildNode(RenderObject* owner, RenderObject* n
ewChild, bool fullAppend) |
138 { | 141 { |
139 ASSERT(newChild->parent() == 0); | 142 ASSERT(newChild->parent() == 0); |
140 ASSERT(!owner->isBlockFlow() || (!newChild->isTableSection() && !newChild->i
sTableRow() && !newChild->isTableCell())); | 143 ASSERT(!owner->isBlockFlow() || (!newChild->isTableSection() && !newChild->i
sTableRow() && !newChild->isTableCell())); |
(...skipping 27 matching lines...) Expand all Loading... |
168 layer->setHasVisibleContent(true); | 171 layer->setHasVisibleContent(true); |
169 } | 172 } |
170 | 173 |
171 if (newChild->isListItem()) | 174 if (newChild->isListItem()) |
172 toRenderListItem(newChild)->updateListMarkerNumbers(); | 175 toRenderListItem(newChild)->updateListMarkerNumbers(); |
173 | 176 |
174 if (!newChild->isFloatingOrPositioned() && owner->childrenInline()) | 177 if (!newChild->isFloatingOrPositioned() && owner->childrenInline()) |
175 owner->dirtyLinesFromChangedChild(newChild); | 178 owner->dirtyLinesFromChangedChild(newChild); |
176 } | 179 } |
177 | 180 |
| 181 RenderCounter::rendererSubtreeAttached(newChild); |
178 newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing blo
ck hierarchy. | 182 newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing blo
ck hierarchy. |
179 if (!owner->normalChildNeedsLayout()) | 183 if (!owner->normalChildNeedsLayout()) |
180 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. | 184 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. |
181 | 185 |
182 if (AXObjectCache::accessibilityEnabled()) | 186 if (AXObjectCache::accessibilityEnabled()) |
183 owner->document()->axObjectCache()->childrenChanged(owner); | 187 owner->document()->axObjectCache()->childrenChanged(owner); |
184 } | 188 } |
185 | 189 |
186 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* c
hild, RenderObject* beforeChild, bool fullInsert) | 190 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* c
hild, RenderObject* beforeChild, bool fullInsert) |
187 { | 191 { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 layer->setHasVisibleContent(true); | 231 layer->setHasVisibleContent(true); |
228 } | 232 } |
229 | 233 |
230 if (child->isListItem()) | 234 if (child->isListItem()) |
231 toRenderListItem(child)->updateListMarkerNumbers(); | 235 toRenderListItem(child)->updateListMarkerNumbers(); |
232 | 236 |
233 if (!child->isFloating() && owner->childrenInline()) | 237 if (!child->isFloating() && owner->childrenInline()) |
234 owner->dirtyLinesFromChangedChild(child); | 238 owner->dirtyLinesFromChangedChild(child); |
235 } | 239 } |
236 | 240 |
| 241 RenderCounter::rendererSubtreeAttached(child); |
237 child->setNeedsLayoutAndPrefWidthsRecalc(); | 242 child->setNeedsLayoutAndPrefWidthsRecalc(); |
238 if (!owner->normalChildNeedsLayout()) | 243 if (!owner->normalChildNeedsLayout()) |
239 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. | 244 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. |
240 | 245 |
241 if (AXObjectCache::accessibilityEnabled()) | 246 if (AXObjectCache::accessibilityEnabled()) |
242 owner->document()->axObjectCache()->childrenChanged(owner); | 247 owner->document()->axObjectCache()->childrenChanged(owner); |
243 } | 248 } |
244 | 249 |
245 static RenderObject* beforeAfterContainer(RenderObject* container, PseudoId type
) | 250 static RenderObject* beforeAfterContainer(RenderObject* container, PseudoId type
) |
246 { | 251 { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 } | 469 } |
465 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen
tStyle)) | 470 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen
tStyle)) |
466 generatedContentContainer->addChild(renderer); | 471 generatedContentContainer->addChild(renderer); |
467 else | 472 else |
468 renderer->destroy(); | 473 renderer->destroy(); |
469 } | 474 } |
470 } | 475 } |
471 } | 476 } |
472 | 477 |
473 } // namespace WebCore | 478 } // namespace WebCore |
OLD | NEW |