OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 break; | 151 break; |
152 default: | 152 default: |
153 ASSERT_NOT_REACHED(); | 153 ASSERT_NOT_REACHED(); |
154 } | 154 } |
155 } else if (child->isTableCell() || child->isTableRow()) | 155 } else if (child->isTableCell() || child->isTableRow()) |
156 wrapInAnonymousSection = true; | 156 wrapInAnonymousSection = true; |
157 else | 157 else |
158 wrapInAnonymousSection = true; | 158 wrapInAnonymousSection = true; |
159 | 159 |
160 if (!wrapInAnonymousSection) { | 160 if (!wrapInAnonymousSection) { |
161 // If the next renderer is actually wrapped in an anonymous table sectio
n, we need to go up and find that. | 161 if (beforeChild && beforeChild->parent() != this) |
162 while (beforeChild && beforeChild->parent() != this) | 162 beforeChild = splitAnonymousBoxesAroundChild(beforeChild); |
163 beforeChild = beforeChild->parent(); | |
164 | 163 |
165 RenderBox::addChild(child, beforeChild); | 164 RenderBox::addChild(child, beforeChild); |
166 return; | 165 return; |
167 } | 166 } |
168 | 167 |
169 if (!beforeChild && lastChild() && lastChild()->isTableSection() && lastChil
d()->isAnonymous() && !lastChild()->isBeforeContent()) { | 168 if (!beforeChild && lastChild() && lastChild()->isTableSection() && lastChil
d()->isAnonymous() && !lastChild()->isBeforeContent()) { |
170 lastChild()->addChild(child); | 169 lastChild()->addChild(child); |
171 return; | 170 return; |
172 } | 171 } |
173 | 172 |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1285 { | 1284 { |
1286 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->sty
le()); | 1285 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->sty
le()); |
1287 newStyle->setDisplay(TABLE); | 1286 newStyle->setDisplay(TABLE); |
1288 | 1287 |
1289 RenderTable* newTable = new (parent->renderArena()) RenderTable(parent->docu
ment() /* is anonymous */); | 1288 RenderTable* newTable = new (parent->renderArena()) RenderTable(parent->docu
ment() /* is anonymous */); |
1290 newTable->setStyle(newStyle.release()); | 1289 newTable->setStyle(newStyle.release()); |
1291 return newTable; | 1290 return newTable; |
1292 } | 1291 } |
1293 | 1292 |
1294 } | 1293 } |
OLD | NEW |