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, 2009 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 if (RenderObject* firstChild = this->firstChild()) | 146 if (RenderObject* firstChild = this->firstChild()) |
147 return toRenderTableCol(firstChild); | 147 return toRenderTableCol(firstChild); |
148 | 148 |
149 // Otherwise it's the next column along. | 149 // Otherwise it's the next column along. |
150 RenderObject* next = nextSibling(); | 150 RenderObject* next = nextSibling(); |
151 | 151 |
152 // Failing that, the child is the last column in a column-group, so the next
column is the next column/column-group after its column-group. | 152 // Failing that, the child is the last column in a column-group, so the next
column is the next column/column-group after its column-group. |
153 if (!next && parent()->isRenderTableCol()) | 153 if (!next && parent()->isRenderTableCol()) |
154 next = parent()->nextSibling(); | 154 next = parent()->nextSibling(); |
155 | 155 |
156 for (; next && !next->isRenderTableCol(); next = next->nextSibling()) { | 156 for (; next && !next->isRenderTableCol(); next = next->nextSibling()) { } |
157 // We allow captions mixed with columns and column-groups. | |
158 if (next->isTableCaption()) | |
159 continue; | |
160 | |
161 return 0; | |
162 } | |
163 | 157 |
164 return toRenderTableCol(next); | 158 return toRenderTableCol(next); |
165 } | 159 } |
166 | 160 |
167 const BorderValue& RenderTableCol::borderAdjoiningCellStartBorder(const RenderTa
bleCell*) const | 161 const BorderValue& RenderTableCol::borderAdjoiningCellStartBorder(const RenderTa
bleCell*) const |
168 { | 162 { |
169 return style()->borderStart(); | 163 return style()->borderStart(); |
170 } | 164 } |
171 | 165 |
172 const BorderValue& RenderTableCol::borderAdjoiningCellEndBorder(const RenderTabl
eCell*) const | 166 const BorderValue& RenderTableCol::borderAdjoiningCellEndBorder(const RenderTabl
eCell*) const |
173 { | 167 { |
174 return style()->borderEnd(); | 168 return style()->borderEnd(); |
175 } | 169 } |
176 | 170 |
177 const BorderValue& RenderTableCol::borderAdjoiningCellBefore(const RenderTableCe
ll* cell) const | 171 const BorderValue& RenderTableCol::borderAdjoiningCellBefore(const RenderTableCe
ll* cell) const |
178 { | 172 { |
179 ASSERT_UNUSED(cell, table()->colElement(cell->col() + cell->colSpan()) == th
is); | 173 ASSERT_UNUSED(cell, table()->colElement(cell->col() + cell->colSpan()) == th
is); |
180 return style()->borderStart(); | 174 return style()->borderStart(); |
181 } | 175 } |
182 | 176 |
183 const BorderValue& RenderTableCol::borderAdjoiningCellAfter(const RenderTableCel
l* cell) const | 177 const BorderValue& RenderTableCol::borderAdjoiningCellAfter(const RenderTableCel
l* cell) const |
184 { | 178 { |
185 ASSERT_UNUSED(cell, table()->colElement(cell->col() - 1) == this); | 179 ASSERT_UNUSED(cell, table()->colElement(cell->col() - 1) == this); |
186 return style()->borderEnd(); | 180 return style()->borderEnd(); |
187 } | 181 } |
188 | 182 |
189 } | 183 } |
OLD | NEW |