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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 void SetEffectiveColumnPosition(unsigned index, int position) { | 206 void SetEffectiveColumnPosition(unsigned index, int position) { |
207 // Note that if our horizontal border-spacing changed, our position will | 207 // Note that if our horizontal border-spacing changed, our position will |
208 // change but not our column's width. In practice, horizontal border-spacing | 208 // change but not our column's width. In practice, horizontal border-spacing |
209 // won't change often. | 209 // won't change often. |
210 column_logical_width_changed_ |= | 210 column_logical_width_changed_ |= |
211 effective_column_positions_[index] != position; | 211 effective_column_positions_[index] != position; |
212 effective_column_positions_[index] = position; | 212 effective_column_positions_[index] = position; |
213 } | 213 } |
214 | 214 |
215 LayoutTableSection* Header() const { | 215 LayoutTableSection* Header() const { |
216 // TODO(mstensho): We should ideally DCHECK(!needsSectionRecalc()) here, but | 216 DCHECK(!NeedsSectionRecalc()); |
mstensho (USE GERRIT)
2017/06/16 08:43:06
Better leave this alone in this CL. I don't even k
rhogan
2017/06/20 18:46:05
OK.
| |
217 // we currently cannot, due to crbug.com/693212 | |
218 return head_; | 217 return head_; |
219 } | 218 } |
220 LayoutTableSection* Footer() const { | 219 LayoutTableSection* Footer() const { |
221 DCHECK(!NeedsSectionRecalc()); | 220 DCHECK(!NeedsSectionRecalc()); |
222 return foot_; | 221 return foot_; |
223 } | 222 } |
224 LayoutTableSection* FirstBody() const { | 223 LayoutTableSection* FirstBody() const { |
225 DCHECK(!NeedsSectionRecalc()); | 224 DCHECK(!NeedsSectionRecalc()); |
226 return first_body_; | 225 return first_body_; |
227 } | 226 } |
228 | 227 |
229 void SetRowOffsetFromRepeatingHeader(LayoutUnit offset) { | 228 void SetRowOffsetFromRepeatingHeader(LayoutUnit offset) { |
230 row_offset_from_repeating_header_ = offset; | 229 row_offset_from_repeating_header_ = offset; |
231 } | 230 } |
232 LayoutUnit RowOffsetFromRepeatingHeader() const { | 231 LayoutUnit RowOffsetFromRepeatingHeader() const { |
233 return row_offset_from_repeating_header_; | 232 return row_offset_from_repeating_header_; |
234 } | 233 } |
235 | 234 |
235 void SetRowOffsetFromRepeatingFooter(LayoutUnit offset) { | |
236 row_offset_from_repeating_footer_ = offset; | |
237 } | |
238 LayoutUnit RowOffsetFromRepeatingFooter() const { | |
239 return row_offset_from_repeating_footer_; | |
240 } | |
241 | |
236 // These functions return nullptr if the table has no sections. | 242 // These functions return nullptr if the table has no sections. |
237 LayoutTableSection* TopSection() const; | 243 LayoutTableSection* TopSection() const; |
238 LayoutTableSection* BottomSection() const; | 244 LayoutTableSection* BottomSection() const; |
239 | 245 |
240 // These functions return nullptr if the table has no non-empty sections. | 246 // These functions return nullptr if the table has no non-empty sections. |
241 LayoutTableSection* TopNonEmptySection() const; | 247 LayoutTableSection* TopNonEmptySection() const; |
242 LayoutTableSection* BottomNonEmptySection() const; | 248 LayoutTableSection* BottomNonEmptySection() const; |
243 | 249 |
244 unsigned LastEffectiveColumnIndex() const { | 250 unsigned LastEffectiveColumnIndex() const { |
245 return NumEffectiveColumns() - 1; | 251 return NumEffectiveColumns() - 1; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
575 short h_spacing_; | 581 short h_spacing_; |
576 short v_spacing_; | 582 short v_spacing_; |
577 | 583 |
578 mutable unsigned collapsed_outer_border_start_; | 584 mutable unsigned collapsed_outer_border_start_; |
579 mutable unsigned collapsed_outer_border_end_; | 585 mutable unsigned collapsed_outer_border_end_; |
580 mutable unsigned collapsed_outer_border_before_; | 586 mutable unsigned collapsed_outer_border_before_; |
581 mutable unsigned collapsed_outer_border_after_; | 587 mutable unsigned collapsed_outer_border_after_; |
582 | 588 |
583 LayoutUnit block_offset_to_first_repeatable_header_; | 589 LayoutUnit block_offset_to_first_repeatable_header_; |
584 LayoutUnit row_offset_from_repeating_header_; | 590 LayoutUnit row_offset_from_repeating_header_; |
591 LayoutUnit row_offset_from_repeating_footer_; | |
585 LayoutUnit old_available_logical_height_; | 592 LayoutUnit old_available_logical_height_; |
586 }; | 593 }; |
587 | 594 |
588 inline LayoutTableSection* LayoutTable::TopSection() const { | 595 inline LayoutTableSection* LayoutTable::TopSection() const { |
589 DCHECK(!NeedsSectionRecalc()); | 596 DCHECK(!NeedsSectionRecalc()); |
590 if (head_) | 597 if (head_) |
591 return head_; | 598 return head_; |
592 if (first_body_) | 599 if (first_body_) |
593 return first_body_; | 600 return first_body_; |
594 return foot_; | 601 return foot_; |
595 } | 602 } |
596 | 603 |
597 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, IsTable()); | 604 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, IsTable()); |
598 | 605 |
599 } // namespace blink | 606 } // namespace blink |
600 | 607 |
601 #endif // LayoutTable_h | 608 #endif // LayoutTable_h |
OLD | NEW |