| 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. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 LayoutUnit RowOffsetFromRepeatingHeader() const { | 273 LayoutUnit RowOffsetFromRepeatingHeader() const { |
| 274 return row_offset_from_repeating_header_; | 274 return row_offset_from_repeating_header_; |
| 275 } | 275 } |
| 276 | 276 |
| 277 // This function returns 0 if the table has no section. | 277 // This function returns 0 if the table has no section. |
| 278 LayoutTableSection* TopSection() const; | 278 LayoutTableSection* TopSection() const; |
| 279 LayoutTableSection* BottomSection() const; | 279 LayoutTableSection* BottomSection() const; |
| 280 | 280 |
| 281 // This function returns 0 if the table has no non-empty sections. | 281 // This function returns 0 if the table has no non-empty sections. |
| 282 LayoutTableSection* TopNonEmptySection() const; | 282 LayoutTableSection* TopNonEmptySection() const; |
| 283 LayoutTableSection* BottomNonEmptySection() const; |
| 283 | 284 |
| 284 unsigned LastEffectiveColumnIndex() const { | 285 unsigned LastEffectiveColumnIndex() const { |
| 285 return NumEffectiveColumns() - 1; | 286 return NumEffectiveColumns() - 1; |
| 286 } | 287 } |
| 287 | 288 |
| 288 void SplitEffectiveColumn(unsigned index, unsigned first_span); | 289 void SplitEffectiveColumn(unsigned index, unsigned first_span); |
| 289 void AppendEffectiveColumn(unsigned span); | 290 void AppendEffectiveColumn(unsigned span); |
| 290 unsigned NumEffectiveColumns() const { return effective_columns_.size(); } | 291 unsigned NumEffectiveColumns() const { return effective_columns_.size(); } |
| 291 unsigned SpanOfEffectiveColumn(unsigned effective_column_index) const { | 292 unsigned SpanOfEffectiveColumn(unsigned effective_column_index) const { |
| 292 return effective_columns_[effective_column_index].span; | 293 return effective_columns_[effective_column_index].span; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 ColAndColGroup ColElementAtAbsoluteColumn( | 373 ColAndColGroup ColElementAtAbsoluteColumn( |
| 373 unsigned absolute_column_index) const { | 374 unsigned absolute_column_index) const { |
| 374 // The common case is to not have col/colgroup elements, make that case | 375 // The common case is to not have col/colgroup elements, make that case |
| 375 // fast. | 376 // fast. |
| 376 if (!has_col_elements_) | 377 if (!has_col_elements_) |
| 377 return ColAndColGroup(); | 378 return ColAndColGroup(); |
| 378 return SlowColElementAtAbsoluteColumn(absolute_column_index); | 379 return SlowColElementAtAbsoluteColumn(absolute_column_index); |
| 379 } | 380 } |
| 380 bool HasColElements() const { return has_col_elements_; } | 381 bool HasColElements() const { return has_col_elements_; } |
| 381 | 382 |
| 383 static const unsigned npos = 0xFFFFFFFF; |
| 384 unsigned ColElementToAbsoluteColumn(const LayoutTableCol*) const; |
| 385 |
| 382 bool NeedsSectionRecalc() const { return needs_section_recalc_; } | 386 bool NeedsSectionRecalc() const { return needs_section_recalc_; } |
| 383 void SetNeedsSectionRecalc() { | 387 void SetNeedsSectionRecalc() { |
| 384 if (DocumentBeingDestroyed()) | 388 if (DocumentBeingDestroyed()) |
| 385 return; | 389 return; |
| 386 // For all we know, sections may have been deleted at this point. Don't | 390 // For all we know, sections may have been deleted at this point. Don't |
| 387 // keep pointers dangling around. | 391 // keep pointers dangling around. |
| 388 head_ = nullptr; | 392 head_ = nullptr; |
| 389 foot_ = nullptr; | 393 foot_ = nullptr; |
| 390 first_body_ = nullptr; | 394 first_body_ = nullptr; |
| 391 | 395 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 if (first_body_) | 621 if (first_body_) |
| 618 return first_body_; | 622 return first_body_; |
| 619 return foot_; | 623 return foot_; |
| 620 } | 624 } |
| 621 | 625 |
| 622 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, IsTable()); | 626 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, IsTable()); |
| 623 | 627 |
| 624 } // namespace blink | 628 } // namespace blink |
| 625 | 629 |
| 626 #endif // LayoutTable_h | 630 #endif // LayoutTable_h |
| OLD | NEW |