| 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, 2013 Apple Inc. All rights | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights |
| 8 * reserved. | 8 * 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 258 } |
| 259 | 259 |
| 260 int PaginationStrutForRow(LayoutTableRow*, LayoutUnit logical_offset) const; | 260 int PaginationStrutForRow(LayoutTableRow*, LayoutUnit logical_offset) const; |
| 261 | 261 |
| 262 bool MapToVisualRectInAncestorSpaceInternal( | 262 bool MapToVisualRectInAncestorSpaceInternal( |
| 263 const LayoutBoxModelObject* ancestor, | 263 const LayoutBoxModelObject* ancestor, |
| 264 TransformState&, | 264 TransformState&, |
| 265 VisualRectFlags = kDefaultVisualRectFlags) const override; | 265 VisualRectFlags = kDefaultVisualRectFlags) const override; |
| 266 | 266 |
| 267 bool IsRepeatingHeaderGroup() const { return is_repeating_header_group_; }; | 267 bool IsRepeatingHeaderGroup() const { return is_repeating_header_group_; }; |
| 268 bool IsRepeatingFooterGroup() const { return is_repeating_footer_group_; }; |
| 268 | 269 |
| 269 void UpdateLayout() override; | 270 void UpdateLayout() override; |
| 270 | 271 |
| 271 CellSpan FullSectionRowSpan() const { return CellSpan(0, grid_.size()); } | 272 CellSpan FullSectionRowSpan() const { return CellSpan(0, grid_.size()); } |
| 272 CellSpan FullTableEffectiveColumnSpan() const { | 273 CellSpan FullTableEffectiveColumnSpan() const { |
| 273 return CellSpan(0, Table()->NumEffectiveColumns()); | 274 return CellSpan(0, Table()->NumEffectiveColumns()); |
| 274 } | 275 } |
| 275 | 276 |
| 276 void DetermineIfHeaderGroupShouldRepeat() { | 277 void DetermineIfHeaderGroupShouldRepeat() { |
| 277 is_repeating_header_group_ = HeaderGroupShouldRepeat(); | 278 is_repeating_header_group_ = HeaderGroupShouldRepeat(); |
| 278 } | 279 } |
| 279 | 280 |
| 280 // Check whether row or row group has visibility:collapse. | 281 // Check whether row or row group has visibility:collapse. |
| 281 bool RowHasVisibilityCollapse(unsigned row) const; | 282 bool RowHasVisibilityCollapse(unsigned row) const; |
| 282 | 283 |
| 284 void DetermineIfFooterGroupShouldRepeat() { |
| 285 is_repeating_footer_group_ = FooterGroupShouldRepeat(); |
| 286 } |
| 287 |
| 283 protected: | 288 protected: |
| 284 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; | 289 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; |
| 285 bool NodeAtPoint(HitTestResult&, | 290 bool NodeAtPoint(HitTestResult&, |
| 286 const HitTestLocation& location_in_container, | 291 const HitTestLocation& location_in_container, |
| 287 const LayoutPoint& accumulated_offset, | 292 const LayoutPoint& accumulated_offset, |
| 288 HitTestAction) override; | 293 HitTestAction) override; |
| 289 | 294 |
| 290 private: | 295 private: |
| 291 bool IsOfType(LayoutObjectType type) const override { | 296 bool IsOfType(LayoutObjectType type) const override { |
| 292 return type == kLayoutObjectTableSection || LayoutBox::IsOfType(type); | 297 return type == kLayoutObjectTableSection || LayoutBox::IsOfType(type); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 void RelayoutCellIfFlexed(LayoutTableCell&, int row_index, int row_height); | 367 void RelayoutCellIfFlexed(LayoutTableCell&, int row_index, int row_height); |
| 363 | 368 |
| 364 int LogicalHeightForRow(const LayoutTableRow&) const; | 369 int LogicalHeightForRow(const LayoutTableRow&) const; |
| 365 | 370 |
| 366 // Honor breaking restrictions inside the table row, and adjust position and | 371 // Honor breaking restrictions inside the table row, and adjust position and |
| 367 // size accordingly. | 372 // size accordingly. |
| 368 void AdjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&); | 373 void AdjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&); |
| 369 | 374 |
| 370 bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; | 375 bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; |
| 371 | 376 |
| 372 bool HeaderGroupShouldRepeat() const; | 377 bool HeaderGroupShouldRepeat() const { |
| 378 return Table()->Header() == this && GroupShouldRepeat(); |
| 379 } |
| 380 |
| 381 bool FooterGroupShouldRepeat() const { |
| 382 return Table()->Footer() == this && GroupShouldRepeat(); |
| 383 } |
| 384 |
| 385 bool GroupShouldRepeat() const; |
| 373 | 386 |
| 374 struct TableGridRow { | 387 struct TableGridRow { |
| 375 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 388 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 376 | 389 |
| 377 public: | 390 public: |
| 378 inline void SetRowLogicalHeightToRowStyleLogicalHeight(); | 391 inline void SetRowLogicalHeightToRowStyleLogicalHeight(); |
| 379 inline void UpdateLogicalHeightForCell(const LayoutTableCell*); | 392 inline void UpdateLogicalHeightForCell(const LayoutTableCell*); |
| 380 | 393 |
| 381 // The index is effective column index. | 394 // The index is effective column index. |
| 382 Vector<TableGridCell> grid_cells; | 395 Vector<TableGridCell> grid_cells; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // | 446 // |
| 434 // The use is to disable a painting optimization where we just paint the | 447 // The use is to disable a painting optimization where we just paint the |
| 435 // invalidated cells. | 448 // invalidated cells. |
| 436 bool has_multiple_cell_levels_; | 449 bool has_multiple_cell_levels_; |
| 437 | 450 |
| 438 // Whether any cell spans multiple rows or cols. | 451 // Whether any cell spans multiple rows or cols. |
| 439 bool has_spanning_cells_; | 452 bool has_spanning_cells_; |
| 440 | 453 |
| 441 // Header group should be painted on every page. | 454 // Header group should be painted on every page. |
| 442 bool is_repeating_header_group_; | 455 bool is_repeating_header_group_; |
| 456 |
| 457 // Footer group should be painted on every page. |
| 458 bool is_repeating_footer_group_; |
| 443 }; | 459 }; |
| 444 | 460 |
| 445 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); | 461 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); |
| 446 | 462 |
| 447 } // namespace blink | 463 } // namespace blink |
| 448 | 464 |
| 449 #endif // LayoutTableSection_h | 465 #endif // LayoutTableSection_h |
| OLD | NEW |