| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // column is the next column/column-group after its column-group. | 160 // column is the next column/column-group after its column-group. |
| 161 if (!next && Parent()->IsLayoutTableCol()) | 161 if (!next && Parent()->IsLayoutTableCol()) |
| 162 next = Parent()->NextSibling(); | 162 next = Parent()->NextSibling(); |
| 163 | 163 |
| 164 for (; next && !next->IsLayoutTableCol(); next = next->NextSibling()) { | 164 for (; next && !next->IsLayoutTableCol(); next = next->NextSibling()) { |
| 165 } | 165 } |
| 166 | 166 |
| 167 return ToLayoutTableCol(next); | 167 return ToLayoutTableCol(next); |
| 168 } | 168 } |
| 169 | 169 |
| 170 LayoutTableCol* LayoutTableCol::NextInnermostColumn() const { |
| 171 auto* col = NextColumn(); |
| 172 while (col && !col->IsInnermost()) |
| 173 col = col->NextColumn(); |
| 174 return col; |
| 175 } |
| 176 |
| 170 BorderValue LayoutTableCol::BorderAdjoiningCellStartBorder( | 177 BorderValue LayoutTableCol::BorderAdjoiningCellStartBorder( |
| 171 const LayoutTableCell*) const { | 178 const LayoutTableCell*) const { |
| 172 return Style()->BorderStart(); | 179 return Style()->BorderStart(); |
| 173 } | 180 } |
| 174 | 181 |
| 175 BorderValue LayoutTableCol::BorderAdjoiningCellEndBorder( | 182 BorderValue LayoutTableCol::BorderAdjoiningCellEndBorder( |
| 176 const LayoutTableCell*) const { | 183 const LayoutTableCell*) const { |
| 177 return Style()->BorderEnd(); | 184 return Style()->BorderEnd(); |
| 178 } | 185 } |
| 179 | 186 |
| 180 BorderValue LayoutTableCol::BorderAdjoiningCellBefore( | 187 BorderValue LayoutTableCol::BorderAdjoiningCellBefore( |
| 181 const LayoutTableCell* cell) const { | 188 const LayoutTableCell* cell) const { |
| 182 DCHECK_EQ(Table() | 189 DCHECK_EQ(Table() |
| 183 ->ColElementAtAbsoluteColumn(cell->AbsoluteColumnIndex() + | 190 ->ColAndColGroupAtEffectiveColumn( |
| 184 cell->ColSpan()) | 191 cell->EffectiveColumnIndexOfCellAfter()) |
| 185 .InnermostColOrColGroup(), | 192 .InnermostColOrColGroup(), |
| 186 this); | 193 this); |
| 187 return Style()->BorderStart(); | 194 return Style()->BorderStart(); |
| 188 } | 195 } |
| 189 | 196 |
| 190 BorderValue LayoutTableCol::BorderAdjoiningCellAfter( | 197 BorderValue LayoutTableCol::BorderAdjoiningCellAfter( |
| 191 const LayoutTableCell* cell) const { | 198 const LayoutTableCell* cell) const { |
| 192 DCHECK_EQ(Table() | 199 DCHECK_EQ( |
| 193 ->ColElementAtAbsoluteColumn(cell->AbsoluteColumnIndex() - 1) | 200 Table() |
| 194 .InnermostColOrColGroup(), | 201 ->ColAndColGroupAtEffectiveColumn(cell->EffectiveColumnIndex() - 1) |
| 195 this); | 202 .InnermostColOrColGroup(), |
| 203 this); |
| 196 return Style()->BorderEnd(); | 204 return Style()->BorderEnd(); |
| 197 } | 205 } |
| 198 | 206 |
| 199 } // namespace blink | 207 } // namespace blink |
| OLD | NEW |