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

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 25687002: Add support for the column-fill property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 6470 matching lines...) Expand 10 before | Expand all | Expand 10 after
6481 LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalH eight); 6481 LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalH eight);
6482 setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight); 6482 setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight);
6483 if (((lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeigh tAtNewOffset) || (!style()->hasAutoOrphans() && style()->orphans() >= lineCount( lineBox))) 6483 if (((lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeigh tAtNewOffset) || (!style()->hasAutoOrphans() && style()->orphans() >= lineCount( lineBox)))
6484 && !isOutOfFlowPositioned() && !isTableCell()) 6484 && !isOutOfFlowPositioned() && !isTableCell())
6485 setPaginationStrut(remainingLogicalHeight + max<LayoutUnit>(0, logic alOffset)); 6485 setPaginationStrut(remainingLogicalHeight + max<LayoutUnit>(0, logic alOffset));
6486 else { 6486 else {
6487 delta += remainingLogicalHeight; 6487 delta += remainingLogicalHeight;
6488 lineBox->setPaginationStrut(remainingLogicalHeight); 6488 lineBox->setPaginationStrut(remainingLogicalHeight);
6489 lineBox->setIsFirstAfterPageBreak(true); 6489 lineBox->setIsFirstAfterPageBreak(true);
6490 } 6490 }
6491 } else if (remainingLogicalHeight == pageLogicalHeight && lineBox != firstRo otBox()) 6491 } else if (remainingLogicalHeight == pageLogicalHeight) {
6492 lineBox->setIsFirstAfterPageBreak(true); 6492 // We're at the very top of a page or column.
6493 if (lineBox != firstRootBox())
6494 lineBox->setIsFirstAfterPageBreak(true);
6495 if (lineBox != firstRootBox() || offsetFromLogicalTopOfFirstPage())
6496 setPageBreak(logicalOffset, lineHeight);
6497 }
6493 } 6498 }
6494 6499
6495 bool RenderBlock::lineWidthForPaginatedLineChanged(RootInlineBox* rootBox, Layou tUnit lineDelta, RenderFlowThread* flowThread) const 6500 bool RenderBlock::lineWidthForPaginatedLineChanged(RootInlineBox* rootBox, Layou tUnit lineDelta, RenderFlowThread* flowThread) const
6496 { 6501 {
6497 if (!flowThread) 6502 if (!flowThread)
6498 return false; 6503 return false;
6499 6504
6500 RenderRegion* currentRegion = regionAtBlockOffset(rootBox->lineTopWithLeadin g() + lineDelta); 6505 RenderRegion* currentRegion = regionAtBlockOffset(rootBox->lineTopWithLeadin g() + lineDelta);
6501 // Just bail if the region didn't change. 6506 // Just bail if the region didn't change.
6502 if (rootBox->containingRegion() == currentRegion) 6507 if (rootBox->containingRegion() == currentRegion)
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
6815 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 6820 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
6816 { 6821 {
6817 showRenderObject(); 6822 showRenderObject();
6818 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 6823 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
6819 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 6824 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
6820 } 6825 }
6821 6826
6822 #endif 6827 #endif
6823 6828
6824 } // namespace WebCore 6829 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698