| 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, 2010 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 LayoutTableSection* header() const { return m_head; } | 217 LayoutTableSection* header() const { return m_head; } |
| 218 LayoutTableSection* footer() const { return m_foot; } | 218 LayoutTableSection* footer() const { return m_foot; } |
| 219 LayoutTableSection* firstBody() const { return m_firstBody; } | 219 LayoutTableSection* firstBody() const { return m_firstBody; } |
| 220 | 220 |
| 221 // This function returns 0 if the table has no section. | 221 // This function returns 0 if the table has no section. |
| 222 LayoutTableSection* topSection() const; | 222 LayoutTableSection* topSection() const; |
| 223 LayoutTableSection* bottomSection() const; | 223 LayoutTableSection* bottomSection() const; |
| 224 | 224 |
| 225 // This function returns 0 if the table has no non-empty sections. | 225 // This function returns 0 if the table has no non-empty sections. |
| 226 LayoutTableSection* topNonEmptySection() const; | 226 LayoutTableSection* topNonEmptySection() const; |
| 227 LayoutTableSection* bottomNonEmptySection() const; |
| 227 | 228 |
| 228 unsigned lastColumnIndex() const { return numEffCols() - 1; } | 229 unsigned lastColumnIndex() const { return numEffCols() - 1; } |
| 229 | 230 |
| 230 void splitColumn(unsigned position, unsigned firstSpan); | 231 void splitColumn(unsigned position, unsigned firstSpan); |
| 231 void appendColumn(unsigned span); | 232 void appendColumn(unsigned span); |
| 232 unsigned numEffCols() const { return m_columns.size(); } | 233 unsigned numEffCols() const { return m_columns.size(); } |
| 233 unsigned spanOfEffCol(unsigned effCol) const { return m_columns[effCol].span
; } | 234 unsigned spanOfEffCol(unsigned effCol) const { return m_columns[effCol].span
; } |
| 234 | 235 |
| 235 unsigned colToEffCol(unsigned column) const | 236 unsigned colToEffCol(unsigned column) const |
| 236 { | 237 { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 303 } |
| 303 }; | 304 }; |
| 304 ColAndColGroup colElement(unsigned col) const | 305 ColAndColGroup colElement(unsigned col) const |
| 305 { | 306 { |
| 306 // The common case is to not have columns, make that case fast. | 307 // The common case is to not have columns, make that case fast. |
| 307 if (!m_hasColElements) | 308 if (!m_hasColElements) |
| 308 return ColAndColGroup(); | 309 return ColAndColGroup(); |
| 309 return slowColElement(col); | 310 return slowColElement(col); |
| 310 } | 311 } |
| 311 | 312 |
| 313 unsigned colElementToCol(const LayoutTableCol *) const; |
| 314 |
| 312 bool needsSectionRecalc() const { return m_needsSectionRecalc; } | 315 bool needsSectionRecalc() const { return m_needsSectionRecalc; } |
| 313 void setNeedsSectionRecalc() | 316 void setNeedsSectionRecalc() |
| 314 { | 317 { |
| 315 if (documentBeingDestroyed()) | 318 if (documentBeingDestroyed()) |
| 316 return; | 319 return; |
| 317 m_needsSectionRecalc = true; | 320 m_needsSectionRecalc = true; |
| 318 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::TableCh
anged); | 321 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::TableCh
anged); |
| 319 } | 322 } |
| 320 | 323 |
| 321 LayoutTableSection* sectionAbove(const LayoutTableSection*, SkipEmptySection
sValue = DoNotSkipEmptySections) const; | 324 LayoutTableSection* sectionAbove(const LayoutTableSection*, SkipEmptySection
sValue = DoNotSkipEmptySections) const; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 if (m_firstBody) | 499 if (m_firstBody) |
| 497 return m_firstBody; | 500 return m_firstBody; |
| 498 return m_foot; | 501 return m_foot; |
| 499 } | 502 } |
| 500 | 503 |
| 501 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); | 504 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); |
| 502 | 505 |
| 503 } // namespace blink | 506 } // namespace blink |
| 504 | 507 |
| 505 #endif // LayoutTable_h | 508 #endif // LayoutTable_h |
| OLD | NEW |