| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 if (AXObjectCache* cache = owner->document().existingAXObjectCache()) | 108 if (AXObjectCache* cache = owner->document().existingAXObjectCache()) |
| 109 cache->childrenChanged(owner); | 109 cache->childrenChanged(owner); |
| 110 | 110 |
| 111 return oldChild; | 111 return oldChild; |
| 112 } | 112 } |
| 113 | 113 |
| 114 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* n
ewChild, RenderObject* beforeChild, bool notifyRenderer) | 114 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* n
ewChild, RenderObject* beforeChild, bool notifyRenderer) |
| 115 { | 115 { |
| 116 ASSERT(!newChild->parent()); | 116 ASSERT(!newChild->parent()); |
| 117 ASSERT(!owner->isRenderBlockFlow() || (!newChild->isTableSection() && !newCh
ild->isTableRow() && !newChild->isTableCell())); | 117 ASSERT(!owner->isRenderBlockFlow() || (!newChild->isTableSection() && !newCh
ild->isTableRow() && !newChild->isTableCell())); |
| 118 ASSERT_WITH_SECURITY_IMPLICATION(!owner->isTable() || (newChild->isTableCapt
ion() || newChild->isTableSection() || newChild->isRenderTableCol())); | |
| 119 | 118 |
| 120 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owne
r) | 119 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owne
r) |
| 121 beforeChild = beforeChild->parent(); | 120 beforeChild = beforeChild->parent(); |
| 122 | 121 |
| 123 // This should never happen, but if it does prevent render tree corruption | 122 // This should never happen, but if it does prevent render tree corruption |
| 124 // where child->parent() ends up being owner but child->nextSibling()->paren
t() | 123 // where child->parent() ends up being owner but child->nextSibling()->paren
t() |
| 125 // is not owner. | 124 // is not owner. |
| 126 if (beforeChild && beforeChild->parent() != owner) { | 125 if (beforeChild && beforeChild->parent() != owner) { |
| 127 ASSERT_NOT_REACHED(); | 126 ASSERT_NOT_REACHED(); |
| 128 return; | 127 return; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 156 | 155 |
| 157 newChild->setNeedsLayoutAndPrefWidthsRecalc(); | 156 newChild->setNeedsLayoutAndPrefWidthsRecalc(); |
| 158 if (!owner->normalChildNeedsLayout()) | 157 if (!owner->normalChildNeedsLayout()) |
| 159 owner->setChildNeedsLayout(); // We may supply the static position for a
n absolute positioned child. | 158 owner->setChildNeedsLayout(); // We may supply the static position for a
n absolute positioned child. |
| 160 | 159 |
| 161 if (AXObjectCache* cache = owner->document().axObjectCache()) | 160 if (AXObjectCache* cache = owner->document().axObjectCache()) |
| 162 cache->childrenChanged(owner); | 161 cache->childrenChanged(owner); |
| 163 } | 162 } |
| 164 | 163 |
| 165 } // namespace WebCore | 164 } // namespace WebCore |
| OLD | NEW |