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, 2007, 2008, 2009, 2010, 2013 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
10 * | 10 * |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 // layout here instead of walking through individual parts of the tree. | 528 // layout here instead of walking through individual parts of the tree. |
529 // crbug.com/442737 | 529 // crbug.com/442737 |
530 for (auto& caption : captions_) | 530 for (auto& caption : captions_) |
531 caption->LayoutIfNeeded(); | 531 caption->LayoutIfNeeded(); |
532 | 532 |
533 for (LayoutTableSection* section = TopSection(); section; | 533 for (LayoutTableSection* section = TopSection(); section; |
534 section = SectionBelow(section)) { | 534 section = SectionBelow(section)) { |
535 section->LayoutIfNeeded(); | 535 section->LayoutIfNeeded(); |
536 section->LayoutRows(); | 536 section->LayoutRows(); |
537 section->ComputeOverflowFromCells(); | 537 section->ComputeOverflowFromCells(); |
538 section->UpdateLayerTransformAfterLayout(); | 538 section->UpdateAfterLayout(); |
539 section->AddVisualEffectOverflow(); | 539 section->AddVisualEffectOverflow(); |
540 } | 540 } |
541 } | 541 } |
542 | 542 |
543 bool LayoutTable::RecalcChildOverflowAfterStyleChange() { | 543 bool LayoutTable::RecalcChildOverflowAfterStyleChange() { |
544 DCHECK(ChildNeedsOverflowRecalcAfterStyleChange()); | 544 DCHECK(ChildNeedsOverflowRecalcAfterStyleChange()); |
545 ClearChildNeedsOverflowRecalcAfterStyleChange(); | 545 ClearChildNeedsOverflowRecalcAfterStyleChange(); |
546 | 546 |
547 // If the table sections we keep pointers to have gone away then the table | 547 // If the table sections we keep pointers to have gone away then the table |
548 // will be rebuilt and overflow will get recalculated anyway so return early. | 548 // will be rebuilt and overflow will get recalculated anyway so return early. |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 } | 725 } |
726 | 726 |
727 // position the table sections | 727 // position the table sections |
728 LayoutTableSection* section = top_section; | 728 LayoutTableSection* section = top_section; |
729 while (section) { | 729 while (section) { |
730 section->SetLogicalLocation( | 730 section->SetLogicalLocation( |
731 LayoutPoint(section_logical_left, LogicalHeight())); | 731 LayoutPoint(section_logical_left, LogicalHeight())); |
732 | 732 |
733 SetLogicalHeight(LogicalHeight() + section->LogicalHeight()); | 733 SetLogicalHeight(LogicalHeight() + section->LogicalHeight()); |
734 | 734 |
735 section->UpdateLayerTransformAfterLayout(); | 735 section->UpdateAfterLayout(); |
736 section->AddVisualEffectOverflow(); | 736 section->AddVisualEffectOverflow(); |
737 | 737 |
738 section = SectionBelow(section); | 738 section = SectionBelow(section); |
739 } | 739 } |
740 | 740 |
741 SetLogicalHeight(LogicalHeight() + border_and_padding_after); | 741 SetLogicalHeight(LogicalHeight() + border_and_padding_after); |
742 | 742 |
743 // Lay out bottom captions. | 743 // Lay out bottom captions. |
744 for (unsigned i = 0; i < captions_.size(); i++) { | 744 for (unsigned i = 0; i < captions_.size(); i++) { |
745 if (captions_[i]->Style()->CaptionSide() != ECaptionSide::kBottom) | 745 if (captions_[i]->Style()->CaptionSide() != ECaptionSide::kBottom) |
746 continue; | 746 continue; |
747 LayoutCaption(*captions_[i], layouter); | 747 LayoutCaption(*captions_[i], layouter); |
748 } | 748 } |
749 | 749 |
750 UpdateLogicalHeight(); | 750 UpdateLogicalHeight(); |
751 | 751 |
752 // table can be containing block of positioned elements. | 752 // table can be containing block of positioned elements. |
753 bool dimension_changed = old_logical_width != LogicalWidth() || | 753 bool dimension_changed = old_logical_width != LogicalWidth() || |
754 old_logical_height != LogicalHeight(); | 754 old_logical_height != LogicalHeight(); |
755 LayoutPositionedObjects(dimension_changed); | 755 LayoutPositionedObjects(dimension_changed); |
756 | 756 |
757 UpdateLayerTransformAfterLayout(); | |
758 | |
759 // Layout was changed, so probably borders too. | 757 // Layout was changed, so probably borders too. |
760 InvalidateCollapsedBorders(); | 758 InvalidateCollapsedBorders(); |
761 | 759 |
762 ComputeOverflow(ClientLogicalBottom()); | 760 ComputeOverflow(ClientLogicalBottom()); |
763 UpdateAfterLayout(); | 761 UpdateAfterLayout(); |
764 | 762 |
765 if (state.IsPaginated() && IsPageLogicalHeightKnown()) { | 763 if (state.IsPaginated() && IsPageLogicalHeightKnown()) { |
766 block_offset_to_first_repeatable_header_ = state.PageLogicalOffset( | 764 block_offset_to_first_repeatable_header_ = state.PageLogicalOffset( |
767 *this, top_section ? top_section->LogicalTop() : LayoutUnit()); | 765 *this, top_section ? top_section->LogicalTop() : LayoutUnit()); |
768 } | 766 } |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 } | 1738 } |
1741 | 1739 |
1742 LayoutUnit LayoutTable::PaddingRight() const { | 1740 LayoutUnit LayoutTable::PaddingRight() const { |
1743 if (CollapseBorders()) | 1741 if (CollapseBorders()) |
1744 return LayoutUnit(); | 1742 return LayoutUnit(); |
1745 | 1743 |
1746 return LayoutBlock::PaddingRight(); | 1744 return LayoutBlock::PaddingRight(); |
1747 } | 1745 } |
1748 | 1746 |
1749 } // namespace blink | 1747 } // namespace blink |
OLD | NEW |