Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2584143003: Repeat footers in paginated context (Closed)
Patch Set: bug 656232 Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 5858 matching lines...) Expand 10 before | Expand all | Expand 10 after
5869 if (!IsPageLogicalHeightKnown()) 5869 if (!IsPageLogicalHeightKnown())
5870 return false; 5870 return false;
5871 return PageRemainingLogicalHeightForOffset(offset, kAssociateWithLatterPage) < 5871 return PageRemainingLogicalHeightForOffset(offset, kAssociateWithLatterPage) <
5872 logical_height; 5872 logical_height;
5873 } 5873 }
5874 5874
5875 LayoutUnit LayoutBox::CalculatePaginationStrutToFitContent( 5875 LayoutUnit LayoutBox::CalculatePaginationStrutToFitContent(
5876 LayoutUnit offset, 5876 LayoutUnit offset,
5877 LayoutUnit strut_to_next_page, 5877 LayoutUnit strut_to_next_page,
5878 LayoutUnit content_logical_height) const { 5878 LayoutUnit content_logical_height) const {
5879 DCHECK_EQ(strut_to_next_page, PageRemainingLogicalHeightForOffset(
mstensho (USE GERRIT) 2017/07/17 10:38:08 I think this one is worth keeping.
rhogan 2017/07/24 18:56:07 Done. This was accidental as you can probably gues
5880 offset, kAssociateWithLatterPage));
5881 // If we're inside a cell in a row that straddles a page then avoid the 5879 // If we're inside a cell in a row that straddles a page then avoid the
5882 // repeating header group if necessary. If we're a table section we're 5880 // repeating header group if necessary. If we're a table section we're
5883 // already accounting for it. 5881 // already accounting for it.
5884 if (!IsTableSection()) { 5882 if (!IsTableSection()) {
5885 LayoutState* layout_state = View()->GetLayoutState(); 5883 LayoutState* layout_state = View()->GetLayoutState();
5886 strut_to_next_page += layout_state->HeightOffsetForTableHeaders(); 5884 strut_to_next_page += layout_state->HeightOffsetForTableHeaders();
5887 } 5885 }
5888 5886
5889 LayoutUnit next_page_logical_top = offset + strut_to_next_page; 5887 LayoutUnit next_page_logical_top = offset + strut_to_next_page;
5890 if (PageLogicalHeightForOffset(next_page_logical_top) >= 5888 if (PageLogicalHeightForOffset(next_page_logical_top) >=
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
5969 void LayoutBox::MutableForPainting:: 5967 void LayoutBox::MutableForPainting::
5970 SavePreviousContentBoxSizeAndLayoutOverflowRect() { 5968 SavePreviousContentBoxSizeAndLayoutOverflowRect() {
5971 auto& rare_data = GetLayoutBox().EnsureRareData(); 5969 auto& rare_data = GetLayoutBox().EnsureRareData();
5972 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; 5970 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true;
5973 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); 5971 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size();
5974 rare_data.previous_layout_overflow_rect_ = 5972 rare_data.previous_layout_overflow_rect_ =
5975 GetLayoutBox().LayoutOverflowRect(); 5973 GetLayoutBox().LayoutOverflowRect();
5976 } 5974 }
5977 5975
5978 } // namespace blink 5976 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698