| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // border spacing, border collapsing, missing cells, etc. For simplicity, | 334 // border spacing, border collapsing, missing cells, etc. For simplicity, |
| 335 // just conservatively assume all table sections are not opaque. | 335 // just conservatively assume all table sections are not opaque. |
| 336 bool ForegroundIsKnownToBeOpaqueInRect(const LayoutRect&, | 336 bool ForegroundIsKnownToBeOpaqueInRect(const LayoutRect&, |
| 337 unsigned) const override { | 337 unsigned) const override { |
| 338 return false; | 338 return false; |
| 339 } | 339 } |
| 340 bool BackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { | 340 bool BackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { |
| 341 return false; | 341 return false; |
| 342 } | 342 } |
| 343 | 343 |
| 344 // Returns cell's position before any transformations are applied. |
| 345 LayoutRect GetCellPosition(unsigned row, unsigned effective_column) const; |
| 346 // Returns cell's position after transforms. |
| 347 LayoutRect GetCellPhysicalPosition(unsigned row, |
| 348 unsigned effective_column) const; |
| 349 |
| 344 int PaginationStrutForRow(LayoutTableRow*, LayoutUnit logical_offset) const; | 350 int PaginationStrutForRow(LayoutTableRow*, LayoutUnit logical_offset) const; |
| 345 | 351 |
| 346 bool MapToVisualRectInAncestorSpaceInternal( | 352 bool MapToVisualRectInAncestorSpaceInternal( |
| 347 const LayoutBoxModelObject* ancestor, | 353 const LayoutBoxModelObject* ancestor, |
| 348 TransformState&, | 354 TransformState&, |
| 349 VisualRectFlags = kDefaultVisualRectFlags) const override; | 355 VisualRectFlags = kDefaultVisualRectFlags) const override; |
| 350 | 356 |
| 351 bool IsRepeatingHeaderGroup() const; | 357 bool IsRepeatingHeaderGroup() const; |
| 352 | 358 |
| 353 void UpdateLayout() override; | 359 void UpdateLayout() override; |
| 354 | 360 |
| 355 CellSpan FullSectionRowSpan() const { return CellSpan(0, grid_.size()); } | 361 CellSpan FullSectionRowSpan() const { return CellSpan(0, grid_.size()); } |
| 356 CellSpan FullTableEffectiveColumnSpan() const { | 362 CellSpan FullTableEffectiveColumnSpan() const { |
| 357 return CellSpan(0, Table()->NumEffectiveColumns()); | 363 return CellSpan(0, Table()->NumEffectiveColumns()); |
| 358 } | 364 } |
| 359 | 365 |
| 366 // Collapsed borders are painted by the section |
| 367 bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override { |
| 368 return false; |
| 369 } |
| 370 |
| 360 protected: | 371 protected: |
| 361 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; | 372 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; |
| 362 bool NodeAtPoint(HitTestResult&, | 373 bool NodeAtPoint(HitTestResult&, |
| 363 const HitTestLocation& location_in_container, | 374 const HitTestLocation& location_in_container, |
| 364 const LayoutPoint& accumulated_offset, | 375 const LayoutPoint& accumulated_offset, |
| 365 HitTestAction) override; | 376 HitTestAction) override; |
| 366 | 377 |
| 367 private: | 378 private: |
| 368 bool IsOfType(LayoutObjectType type) const override { | 379 bool IsOfType(LayoutObjectType type) const override { |
| 369 return type == kLayoutObjectTableSection || LayoutBox::IsOfType(type); | 380 return type == kLayoutObjectTableSection || LayoutBox::IsOfType(type); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 unsigned effective_column) const; | 455 unsigned effective_column) const; |
| 445 | 456 |
| 446 void RelayoutCellIfFlexed(LayoutTableCell&, int row_index, int row_height); | 457 void RelayoutCellIfFlexed(LayoutTableCell&, int row_index, int row_height); |
| 447 | 458 |
| 448 int LogicalHeightForRow(const LayoutTableRow&) const; | 459 int LogicalHeightForRow(const LayoutTableRow&) const; |
| 449 | 460 |
| 450 // Honor breaking restrictions inside the table row, and adjust position and | 461 // Honor breaking restrictions inside the table row, and adjust position and |
| 451 // size accordingly. | 462 // size accordingly. |
| 452 void AdjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&); | 463 void AdjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&); |
| 453 | 464 |
| 454 bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; | 465 LayoutRect TransformLogicalToPhysicalPosition( |
| 466 const LayoutRect& position) const; |
| 455 | 467 |
| 456 // The representation of the rows and their cells (CellStruct). | 468 // The representation of the rows and their cells (CellStruct). |
| 457 Vector<RowStruct> grid_; | 469 Vector<RowStruct> grid_; |
| 458 | 470 |
| 459 // The logical offset of each row from the top of the section. | 471 // The logical offset of each row from the top of the section. |
| 460 // | 472 // |
| 461 // Note that this Vector has one more entry than the number of rows so that | 473 // Note that this Vector has one more entry than the number of rows so that |
| 462 // we can keep track of the final size of the section. That is, | 474 // we can keep track of the final size of the section. That is, |
| 463 // m_rowPos[m_grid.size()] is a valid entry. | 475 // m_rowPos[m_grid.size()] is a valid entry. |
| 464 // | 476 // |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 | 514 |
| 503 // Whether any cell spans multiple rows or cols. | 515 // Whether any cell spans multiple rows or cols. |
| 504 bool has_spanning_cells_; | 516 bool has_spanning_cells_; |
| 505 }; | 517 }; |
| 506 | 518 |
| 507 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); | 519 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); |
| 508 | 520 |
| 509 } // namespace blink | 521 } // namespace blink |
| 510 | 522 |
| 511 #endif // LayoutTableSection_h | 523 #endif // LayoutTableSection_h |
| OLD | NEW |