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

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

Issue 2356183002: Stay put at the top of the current page when inserting a forced break. (Closed)
Patch Set: Created 4 years, 2 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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 addOutlineRectsForDescendant(*box, rects, additionalOffset, incl udeBlockOverflows); 1654 addOutlineRectsForDescendant(*box, rects, additionalOffset, incl udeBlockOverflows);
1655 } 1655 }
1656 } 1656 }
1657 } 1657 }
1658 1658
1659 LayoutBox* LayoutBlock::createAnonymousBoxWithSameTypeAs(const LayoutObject* par ent) const 1659 LayoutBox* LayoutBlock::createAnonymousBoxWithSameTypeAs(const LayoutObject* par ent) const
1660 { 1660 {
1661 return createAnonymousWithParentAndDisplay(parent, style()->display()); 1661 return createAnonymousWithParentAndDisplay(parent, style()->display());
1662 } 1662 }
1663 1663
1664 LayoutUnit LayoutBlock::nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundar yRule pageBoundaryRule) const 1664 LayoutUnit LayoutBlock::nextPageLogicalTop(LayoutUnit logicalOffset) const
1665 { 1665 {
1666 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); 1666 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
1667 if (!pageLogicalHeight) 1667 if (!pageLogicalHeight)
1668 return logicalOffset; 1668 return logicalOffset;
1669 1669
1670 return logicalOffset + pageRemainingLogicalHeightForOffset(logicalOffset, pa geBoundaryRule); 1670 return logicalOffset + pageRemainingLogicalHeightForOffset(logicalOffset, As sociateWithLatterPage);
1671 } 1671 }
1672 1672
1673 void LayoutBlock::paginatedContentWasLaidOut(LayoutUnit logicalBottomOffsetAfter Pagination) 1673 void LayoutBlock::paginatedContentWasLaidOut(LayoutUnit logicalBottomOffsetAfter Pagination)
1674 { 1674 {
1675 if (LayoutFlowThread* flowThread = flowThreadContainingBlock()) 1675 if (LayoutFlowThread* flowThread = flowThreadContainingBlock())
1676 flowThread->contentWasLaidOut(offsetFromLogicalTopOfFirstPage() + logica lBottomOffsetAfterPagination); 1676 flowThread->contentWasLaidOut(offsetFromLogicalTopOfFirstPage() + logica lBottomOffsetAfterPagination);
1677 } 1677 }
1678 1678
1679 LayoutUnit LayoutBlock::collapsedMarginBeforeForChild(const LayoutBox& child) co nst 1679 LayoutUnit LayoutBlock::collapsedMarginBeforeForChild(const LayoutBox& child) co nst
1680 { 1680 {
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 1946
1947 return availableHeight; 1947 return availableHeight;
1948 } 1948 }
1949 1949
1950 bool LayoutBlock::hasDefiniteLogicalHeight() const 1950 bool LayoutBlock::hasDefiniteLogicalHeight() const
1951 { 1951 {
1952 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); 1952 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1);
1953 } 1953 }
1954 1954
1955 } // namespace blink 1955 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698