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 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 return style()->borderEnd(); | 106 return style()->borderEnd(); |
107 } | 107 } |
108 | 108 |
109 void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild) | 109 void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild) |
110 { | 110 { |
111 if (!child->isTableCell()) { | 111 if (!child->isTableCell()) { |
112 RenderObject* last = beforeChild; | 112 RenderObject* last = beforeChild; |
113 if (!last) | 113 if (!last) |
114 last = lastChild(); | 114 last = lastChild(); |
115 if (last && last->isAnonymous() && last->isTableCell() && !last->isBefor
eOrAfterContent()) { | 115 if (last && last->isAnonymous() && last->isTableCell() && !last->isBefor
eOrAfterContent()) { |
116 if (beforeChild == last) | 116 RenderTableCell* lastCell = toRenderTableCell(last); |
117 beforeChild = last->firstChild(); | 117 if (beforeChild == lastCell) |
118 last->addChild(child, beforeChild); | 118 beforeChild = lastCell->firstChild(); |
| 119 lastCell->addChild(child, beforeChild); |
119 return; | 120 return; |
120 } | 121 } |
121 | 122 |
122 if (beforeChild && !beforeChild->isAnonymous() && beforeChild->parent()
== this) { | 123 if (beforeChild && !beforeChild->isAnonymous() && beforeChild->parent()
== this) { |
123 RenderObject* cell = beforeChild->previousSibling(); | 124 RenderObject* cell = beforeChild->previousSibling(); |
124 if (cell && cell->isTableCell() && cell->isAnonymous()) { | 125 if (cell && cell->isTableCell() && cell->isAnonymous()) { |
125 cell->addChild(child); | 126 cell->addChild(child); |
126 return; | 127 return; |
127 } | 128 } |
128 } | 129 } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 265 |
265 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb
ject* parent) | 266 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb
ject* parent) |
266 { | 267 { |
267 RenderTableRow* newRow = RenderTableRow::createAnonymous(&parent->document()
); | 268 RenderTableRow* newRow = RenderTableRow::createAnonymous(&parent->document()
); |
268 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_ROW); | 269 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_ROW); |
269 newRow->setStyle(newStyle.release()); | 270 newRow->setStyle(newStyle.release()); |
270 return newRow; | 271 return newRow; |
271 } | 272 } |
272 | 273 |
273 } // namespace WebCore | 274 } // namespace WebCore |
OLD | NEW |