| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. 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 5774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5785 return PageRemainingLogicalHeightForOffset(offset, kAssociateWithLatterPage) < | 5785 return PageRemainingLogicalHeightForOffset(offset, kAssociateWithLatterPage) < |
| 5786 logical_height; | 5786 logical_height; |
| 5787 } | 5787 } |
| 5788 | 5788 |
| 5789 LayoutUnit LayoutBox::CalculatePaginationStrutToFitContent( | 5789 LayoutUnit LayoutBox::CalculatePaginationStrutToFitContent( |
| 5790 LayoutUnit offset, | 5790 LayoutUnit offset, |
| 5791 LayoutUnit strut_to_next_page, | 5791 LayoutUnit strut_to_next_page, |
| 5792 LayoutUnit content_logical_height) const { | 5792 LayoutUnit content_logical_height) const { |
| 5793 DCHECK_EQ(strut_to_next_page, PageRemainingLogicalHeightForOffset( | 5793 DCHECK_EQ(strut_to_next_page, PageRemainingLogicalHeightForOffset( |
| 5794 offset, kAssociateWithLatterPage)); | 5794 offset, kAssociateWithLatterPage)); |
| 5795 // If we're a cell in a row that straddles a page then avoid the repeating | 5795 // If we're inside a cell in a row that straddles a page then avoid the |
| 5796 // header group if necessary. | 5796 // repeating header group if necessary. |
| 5797 if (IsTableCell()) { | 5797 if (IsTableCell()) { |
| 5798 const LayoutTableCell* cell = ToLayoutTableCell(this); | 5798 const LayoutTableCell* cell = ToLayoutTableCell(this); |
| 5799 if (!cell->Row()->IsFirstRowInSectionAfterHeader()) | 5799 strut_to_next_page += cell->Table()->RowOffsetFromRepeatingHeader(); |
| 5800 strut_to_next_page += cell->Table()->RowOffsetFromRepeatingHeader(); | |
| 5801 } | 5800 } |
| 5801 |
| 5802 LayoutUnit next_page_logical_top = offset + strut_to_next_page; | 5802 LayoutUnit next_page_logical_top = offset + strut_to_next_page; |
| 5803 if (PageLogicalHeightForOffset(next_page_logical_top) >= | 5803 if (PageLogicalHeightForOffset(next_page_logical_top) >= |
| 5804 content_logical_height) | 5804 content_logical_height) |
| 5805 return strut_to_next_page; // Content fits just fine in the next page or | 5805 return strut_to_next_page; // Content fits just fine in the next page or |
| 5806 // column. | 5806 // column. |
| 5807 | 5807 |
| 5808 // Moving to the top of the next page or column doesn't result in enough space | 5808 // Moving to the top of the next page or column doesn't result in enough space |
| 5809 // for the content that we're trying to fit. If we're in a nested | 5809 // for the content that we're trying to fit. If we're in a nested |
| 5810 // fragmentation context, we may find enough space if we move to a column | 5810 // fragmentation context, we may find enough space if we move to a column |
| 5811 // further ahead, by effectively breaking to the next outer fragmentainer. | 5811 // further ahead, by effectively breaking to the next outer fragmentainer. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5882 void LayoutBox::MutableForPainting:: | 5882 void LayoutBox::MutableForPainting:: |
| 5883 SavePreviousContentBoxSizeAndLayoutOverflowRect() { | 5883 SavePreviousContentBoxSizeAndLayoutOverflowRect() { |
| 5884 auto& rare_data = GetLayoutBox().EnsureRareData(); | 5884 auto& rare_data = GetLayoutBox().EnsureRareData(); |
| 5885 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; | 5885 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; |
| 5886 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); | 5886 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); |
| 5887 rare_data.previous_layout_overflow_rect_ = | 5887 rare_data.previous_layout_overflow_rect_ = |
| 5888 GetLayoutBox().LayoutOverflowRect(); | 5888 GetLayoutBox().LayoutOverflowRect(); |
| 5889 } | 5889 } |
| 5890 | 5890 |
| 5891 } // namespace blink | 5891 } // namespace blink |
| OLD | NEW |