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

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

Issue 2542723002: Margins that start at fragmentainer boundaries should be collapsed away. (Closed)
Patch Set: Back out an unnecessary and potentially harmful change. Created 4 years 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. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 includeBlockOverflows); 1880 includeBlockOverflows);
1881 } 1881 }
1882 } 1882 }
1883 } 1883 }
1884 1884
1885 LayoutBox* LayoutBlock::createAnonymousBoxWithSameTypeAs( 1885 LayoutBox* LayoutBlock::createAnonymousBoxWithSameTypeAs(
1886 const LayoutObject* parent) const { 1886 const LayoutObject* parent) const {
1887 return createAnonymousWithParentAndDisplay(parent, style()->display()); 1887 return createAnonymousWithParentAndDisplay(parent, style()->display());
1888 } 1888 }
1889 1889
1890 LayoutUnit LayoutBlock::nextPageLogicalTop(LayoutUnit logicalOffset) const {
1891 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
1892 if (!pageLogicalHeight)
1893 return logicalOffset;
1894
1895 return logicalOffset + pageRemainingLogicalHeightForOffset(
1896 logicalOffset, AssociateWithLatterPage);
1897 }
1898
1899 void LayoutBlock::paginatedContentWasLaidOut( 1890 void LayoutBlock::paginatedContentWasLaidOut(
1900 LayoutUnit logicalBottomOffsetAfterPagination) { 1891 LayoutUnit logicalBottomOffsetAfterPagination) {
1901 if (LayoutFlowThread* flowThread = flowThreadContainingBlock()) 1892 if (LayoutFlowThread* flowThread = flowThreadContainingBlock())
1902 flowThread->contentWasLaidOut(offsetFromLogicalTopOfFirstPage() + 1893 flowThread->contentWasLaidOut(offsetFromLogicalTopOfFirstPage() +
1903 logicalBottomOffsetAfterPagination); 1894 logicalBottomOffsetAfterPagination);
1904 } 1895 }
1905 1896
1906 LayoutUnit LayoutBlock::collapsedMarginBeforeForChild( 1897 LayoutUnit LayoutBlock::collapsedMarginBeforeForChild(
1907 const LayoutBox& child) const { 1898 const LayoutBox& child) const {
1908 // If the child has the same directionality as we do, then we can just return 1899 // If the child has the same directionality as we do, then we can just return
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 } 2199 }
2209 2200
2210 return availableHeight; 2201 return availableHeight;
2211 } 2202 }
2212 2203
2213 bool LayoutBlock::hasDefiniteLogicalHeight() const { 2204 bool LayoutBlock::hasDefiniteLogicalHeight() const {
2214 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); 2205 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1);
2215 } 2206 }
2216 2207
2217 } // namespace blink 2208 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698