| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 } | 278 } |
| 279 | 279 |
| 280 int PaginationStrutForRow(LayoutTableRow*, LayoutUnit logical_offset) const; | 280 int PaginationStrutForRow(LayoutTableRow*, LayoutUnit logical_offset) const; |
| 281 | 281 |
| 282 bool MapToVisualRectInAncestorSpaceInternal( | 282 bool MapToVisualRectInAncestorSpaceInternal( |
| 283 const LayoutBoxModelObject* ancestor, | 283 const LayoutBoxModelObject* ancestor, |
| 284 TransformState&, | 284 TransformState&, |
| 285 VisualRectFlags = kDefaultVisualRectFlags) const override; | 285 VisualRectFlags = kDefaultVisualRectFlags) const override; |
| 286 | 286 |
| 287 bool IsRepeatingHeaderGroup() const { return is_repeating_header_group_; }; | 287 bool IsRepeatingHeaderGroup() const { return is_repeating_header_group_; }; |
| 288 bool IsRepeatingFooterGroup() const { return is_repeating_footer_group_; }; |
| 288 | 289 |
| 289 void UpdateLayout() override; | 290 void UpdateLayout() override; |
| 290 | 291 |
| 291 CellSpan FullSectionRowSpan() const { return CellSpan(0, grid_.size()); } | 292 CellSpan FullSectionRowSpan() const { return CellSpan(0, grid_.size()); } |
| 292 CellSpan FullTableEffectiveColumnSpan() const { | 293 CellSpan FullTableEffectiveColumnSpan() const { |
| 293 return CellSpan(0, Table()->NumEffectiveColumns()); | 294 return CellSpan(0, Table()->NumEffectiveColumns()); |
| 294 } | 295 } |
| 295 | 296 |
| 296 void DetermineIfHeaderGroupShouldRepeat() { | 297 void DetermineIfHeaderGroupShouldRepeat() { |
| 297 is_repeating_header_group_ = HeaderGroupShouldRepeat(); | 298 is_repeating_header_group_ = HeaderGroupShouldRepeat(); |
| 298 } | 299 } |
| 299 | 300 |
| 301 void DetermineIfFooterGroupShouldRepeat() { |
| 302 is_repeating_footer_group_ = FooterGroupShouldRepeat(); |
| 303 } |
| 304 |
| 300 protected: | 305 protected: |
| 301 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; | 306 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; |
| 302 bool NodeAtPoint(HitTestResult&, | 307 bool NodeAtPoint(HitTestResult&, |
| 303 const HitTestLocation& location_in_container, | 308 const HitTestLocation& location_in_container, |
| 304 const LayoutPoint& accumulated_offset, | 309 const LayoutPoint& accumulated_offset, |
| 305 HitTestAction) override; | 310 HitTestAction) override; |
| 306 | 311 |
| 307 private: | 312 private: |
| 308 bool IsOfType(LayoutObjectType type) const override { | 313 bool IsOfType(LayoutObjectType type) const override { |
| 309 return type == kLayoutObjectTableSection || LayoutBox::IsOfType(type); | 314 return type == kLayoutObjectTableSection || LayoutBox::IsOfType(type); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 | 385 |
| 381 int LogicalHeightForRow(const LayoutTableRow&) const; | 386 int LogicalHeightForRow(const LayoutTableRow&) const; |
| 382 | 387 |
| 383 // Honor breaking restrictions inside the table row, and adjust position and | 388 // Honor breaking restrictions inside the table row, and adjust position and |
| 384 // size accordingly. | 389 // size accordingly. |
| 385 void AdjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&); | 390 void AdjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&); |
| 386 | 391 |
| 387 bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; | 392 bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; |
| 388 | 393 |
| 389 bool HeaderGroupShouldRepeat() const; | 394 bool HeaderGroupShouldRepeat() const; |
| 395 bool FooterGroupShouldRepeat() const; |
| 396 bool GroupShouldRepeat() const; |
| 390 | 397 |
| 391 struct TableGridRow { | 398 struct TableGridRow { |
| 392 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 399 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 393 | 400 |
| 394 public: | 401 public: |
| 395 inline void SetRowLogicalHeightToRowStyleLogicalHeight(); | 402 inline void SetRowLogicalHeightToRowStyleLogicalHeight(); |
| 396 inline void UpdateLogicalHeightForCell(const LayoutTableCell*); | 403 inline void UpdateLogicalHeightForCell(const LayoutTableCell*); |
| 397 | 404 |
| 398 // The index is effective column index. | 405 // The index is effective column index. |
| 399 Vector<TableGridCell> grid_cells; | 406 Vector<TableGridCell> grid_cells; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 // | 448 // |
| 442 // The use is to disable a painting optimization where we just paint the | 449 // The use is to disable a painting optimization where we just paint the |
| 443 // invalidated cells. | 450 // invalidated cells. |
| 444 bool has_multiple_cell_levels_; | 451 bool has_multiple_cell_levels_; |
| 445 | 452 |
| 446 // Whether any cell spans multiple rows or cols. | 453 // Whether any cell spans multiple rows or cols. |
| 447 bool has_spanning_cells_; | 454 bool has_spanning_cells_; |
| 448 | 455 |
| 449 // Header group should be painted on every page. | 456 // Header group should be painted on every page. |
| 450 bool is_repeating_header_group_; | 457 bool is_repeating_header_group_; |
| 458 |
| 459 // Footer group should be painted on every page. |
| 460 bool is_repeating_footer_group_; |
| 451 }; | 461 }; |
| 452 | 462 |
| 453 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); | 463 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); |
| 454 | 464 |
| 455 } // namespace blink | 465 } // namespace blink |
| 456 | 466 |
| 457 #endif // LayoutTableSection_h | 467 #endif // LayoutTableSection_h |
| OLD | NEW |