| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 oldChild->setPreviousSibling(0); | 103 oldChild->setPreviousSibling(0); |
| 104 oldChild->setNextSibling(0); | 104 oldChild->setNextSibling(0); |
| 105 oldChild->setParent(0); | 105 oldChild->setParent(0); |
| 106 | 106 |
| 107 // rendererRemovedFromTree walks the whole subtree. We can improve performan
ce | 107 // rendererRemovedFromTree walks the whole subtree. We can improve performan
ce |
| 108 // by skipping this step when destroying the entire tree. | 108 // by skipping this step when destroying the entire tree. |
| 109 if (!owner->documentBeingDestroyed()) | 109 if (!owner->documentBeingDestroyed()) |
| 110 RenderCounter::rendererRemovedFromTree(oldChild); | 110 RenderCounter::rendererRemovedFromTree(oldChild); |
| 111 | 111 |
| 112 if (AXObjectCache* cache = owner->document()->existingAXObjectCache()) | 112 if (AXObjectCache::accessibilityEnabled()) |
| 113 cache->childrenChanged(owner); | 113 owner->document()->axObjectCache()->childrenChanged(owner); |
| 114 | 114 |
| 115 return oldChild; | 115 return oldChild; |
| 116 } | 116 } |
| 117 | 117 |
| 118 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* n
ewChild, RenderObject* beforeChild, bool notifyRenderer) | 118 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* n
ewChild, RenderObject* beforeChild, bool notifyRenderer) |
| 119 { | 119 { |
| 120 ASSERT(!newChild->parent()); | 120 ASSERT(!newChild->parent()); |
| 121 ASSERT(!owner->isBlockFlow() || (!newChild->isTableSection() && !newChild->i
sTableRow() && !newChild->isTableCell())); | 121 ASSERT(!owner->isBlockFlow() || (!newChild->isTableSection() && !newChild->i
sTableRow() && !newChild->isTableCell())); |
| 122 | 122 |
| 123 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owne
r) | 123 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owne
r) |
| (...skipping 30 matching lines...) Expand all Loading... |
| 154 newChild->insertedIntoTree(); | 154 newChild->insertedIntoTree(); |
| 155 | 155 |
| 156 if (!owner->documentBeingDestroyed()) { | 156 if (!owner->documentBeingDestroyed()) { |
| 157 RenderCounter::rendererSubtreeAttached(newChild); | 157 RenderCounter::rendererSubtreeAttached(newChild); |
| 158 } | 158 } |
| 159 | 159 |
| 160 newChild->setNeedsLayoutAndPrefWidthsRecalc(); | 160 newChild->setNeedsLayoutAndPrefWidthsRecalc(); |
| 161 if (!owner->normalChildNeedsLayout()) | 161 if (!owner->normalChildNeedsLayout()) |
| 162 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. | 162 owner->setChildNeedsLayout(true); // We may supply the static position f
or an absolute positioned child. |
| 163 | 163 |
| 164 if (AXObjectCache* cache = owner->document()->axObjectCache()) | 164 if (AXObjectCache::accessibilityEnabled()) |
| 165 cache->childrenChanged(owner); | 165 owner->document()->axObjectCache()->childrenChanged(owner); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace WebCore | 168 } // namespace WebCore |
| OLD | NEW |