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, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 ++m_cRow; | 174 ++m_cRow; |
175 m_cCol = 0; | 175 m_cCol = 0; |
176 | 176 |
177 ensureRows(m_cRow); | 177 ensureRows(m_cRow); |
178 | 178 |
179 m_grid[insertionRow].rowRenderer = toRenderTableRow(child); | 179 m_grid[insertionRow].rowRenderer = toRenderTableRow(child); |
180 | 180 |
181 if (!beforeChild) | 181 if (!beforeChild) |
182 setRowLogicalHeightToRowStyleLogicalHeightIfNotRelative(m_grid[insertion
Row]); | 182 setRowLogicalHeightToRowStyleLogicalHeightIfNotRelative(m_grid[insertion
Row]); |
183 | 183 |
184 // If the next renderer is actually wrapped in an anonymous table row, we ne
ed to go up and find that. | 184 if (beforeChild && beforeChild->parent() != this) |
185 while (beforeChild && beforeChild->parent() != this) | 185 beforeChild = splitAnonymousBoxesAroundChild(beforeChild); |
186 beforeChild = beforeChild->parent(); | |
187 | 186 |
188 ASSERT(!beforeChild || beforeChild->isTableRow()); | 187 ASSERT(!beforeChild || beforeChild->isTableRow()); |
189 RenderBox::addChild(child, beforeChild); | 188 RenderBox::addChild(child, beforeChild); |
190 toRenderTableRow(child)->updateBeforeAndAfterContent(); | 189 toRenderTableRow(child)->updateBeforeAndAfterContent(); |
191 } | 190 } |
192 | 191 |
193 void RenderTableSection::removeChild(RenderObject* oldChild) | 192 void RenderTableSection::removeChild(RenderObject* oldChild) |
194 { | 193 { |
195 setNeedsCellRecalc(); | 194 setNeedsCellRecalc(); |
196 RenderBox::removeChild(oldChild); | 195 RenderBox::removeChild(oldChild); |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 { | 1416 { |
1418 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->sty
le()); | 1417 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->sty
le()); |
1419 newStyle->setDisplay(TABLE_ROW_GROUP); | 1418 newStyle->setDisplay(TABLE_ROW_GROUP); |
1420 | 1419 |
1421 RenderTableSection* newSection = new (parent->renderArena()) RenderTableSect
ion(parent->document() /* is anonymous */); | 1420 RenderTableSection* newSection = new (parent->renderArena()) RenderTableSect
ion(parent->document() /* is anonymous */); |
1422 newSection->setStyle(newStyle.release()); | 1421 newSection->setStyle(newStyle.release()); |
1423 return newSection; | 1422 return newSection; |
1424 } | 1423 } |
1425 | 1424 |
1426 } // namespace WebCore | 1425 } // namespace WebCore |
OLD | NEW |