| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 LayoutTableSection* header() const { return m_head; } | 244 LayoutTableSection* header() const { return m_head; } |
| 245 LayoutTableSection* footer() const { return m_foot; } | 245 LayoutTableSection* footer() const { return m_foot; } |
| 246 LayoutTableSection* firstBody() const { return m_firstBody; } | 246 LayoutTableSection* firstBody() const { return m_firstBody; } |
| 247 | 247 |
| 248 // This function returns 0 if the table has no section. | 248 // This function returns 0 if the table has no section. |
| 249 LayoutTableSection* topSection() const; | 249 LayoutTableSection* topSection() const; |
| 250 LayoutTableSection* bottomSection() const; | 250 LayoutTableSection* bottomSection() const; |
| 251 | 251 |
| 252 // This function returns 0 if the table has no non-empty sections. | 252 // This function returns 0 if the table has no non-empty sections. |
| 253 LayoutTableSection* topNonEmptySection() const; | 253 LayoutTableSection* topNonEmptySection() const; |
| 254 LayoutTableSection* bottomNonEmptySection() const; |
| 254 | 255 |
| 255 unsigned lastEffectiveColumnIndex() const { return numEffectiveColumns() - 1
; } | 256 unsigned lastEffectiveColumnIndex() const { return numEffectiveColumns() - 1
; } |
| 256 | 257 |
| 257 void splitEffectiveColumn(unsigned index, unsigned firstSpan); | 258 void splitEffectiveColumn(unsigned index, unsigned firstSpan); |
| 258 void appendEffectiveColumn(unsigned span); | 259 void appendEffectiveColumn(unsigned span); |
| 259 unsigned numEffectiveColumns() const { return m_effectiveColumns.size(); } | 260 unsigned numEffectiveColumns() const { return m_effectiveColumns.size(); } |
| 260 unsigned spanOfEffectiveColumn(unsigned effectiveColumnIndex) const { return
m_effectiveColumns[effectiveColumnIndex].span; } | 261 unsigned spanOfEffectiveColumn(unsigned effectiveColumnIndex) const { return
m_effectiveColumns[effectiveColumnIndex].span; } |
| 261 | 262 |
| 262 unsigned absoluteColumnToEffectiveColumn(unsigned absoluteColumnIndex) const | 263 unsigned absoluteColumnToEffectiveColumn(unsigned absoluteColumnIndex) const |
| 263 { | 264 { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 return col ? col : colgroup; | 329 return col ? col : colgroup; |
| 329 } | 330 } |
| 330 }; | 331 }; |
| 331 ColAndColGroup colElementAtAbsoluteColumn(unsigned absoluteColumnIndex) cons
t | 332 ColAndColGroup colElementAtAbsoluteColumn(unsigned absoluteColumnIndex) cons
t |
| 332 { | 333 { |
| 333 // The common case is to not have col/colgroup elements, make that case
fast. | 334 // The common case is to not have col/colgroup elements, make that case
fast. |
| 334 if (!m_hasColElements) | 335 if (!m_hasColElements) |
| 335 return ColAndColGroup(); | 336 return ColAndColGroup(); |
| 336 return slowColElementAtAbsoluteColumn(absoluteColumnIndex); | 337 return slowColElementAtAbsoluteColumn(absoluteColumnIndex); |
| 337 } | 338 } |
| 339 static const unsigned npos = 0xFFFFFFFF; |
| 340 |
| 341 unsigned colElementToAbsoluteColumn(const LayoutTableCol *) const; |
| 338 | 342 |
| 339 bool needsSectionRecalc() const { return m_needsSectionRecalc; } | 343 bool needsSectionRecalc() const { return m_needsSectionRecalc; } |
| 340 void setNeedsSectionRecalc() | 344 void setNeedsSectionRecalc() |
| 341 { | 345 { |
| 342 if (documentBeingDestroyed()) | 346 if (documentBeingDestroyed()) |
| 343 return; | 347 return; |
| 344 m_needsSectionRecalc = true; | 348 m_needsSectionRecalc = true; |
| 345 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::TableCh
anged); | 349 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::TableCh
anged); |
| 346 } | 350 } |
| 347 | 351 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 if (m_firstBody) | 518 if (m_firstBody) |
| 515 return m_firstBody; | 519 return m_firstBody; |
| 516 return m_foot; | 520 return m_foot; |
| 517 } | 521 } |
| 518 | 522 |
| 519 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); | 523 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); |
| 520 | 524 |
| 521 } // namespace blink | 525 } // namespace blink |
| 522 | 526 |
| 523 #endif // LayoutTable_h | 527 #endif // LayoutTable_h |
| OLD | NEW |