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

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: Put changes to problematic files (for the bots) back in. 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
« no previous file with comments | « Source/core/page/UseCounter.cpp ('k') | Source/core/rendering/RenderMultiColumnBlock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6456 matching lines...) Expand 10 before | Expand all | Expand 10 after
6467 LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalH eight); 6467 LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalH eight);
6468 setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight); 6468 setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight);
6469 if (((lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeigh tAtNewOffset) || (!style()->hasAutoOrphans() && style()->orphans() >= lineCount( lineBox))) 6469 if (((lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeigh tAtNewOffset) || (!style()->hasAutoOrphans() && style()->orphans() >= lineCount( lineBox)))
6470 && !isOutOfFlowPositioned() && !isTableCell()) 6470 && !isOutOfFlowPositioned() && !isTableCell())
6471 setPaginationStrut(remainingLogicalHeight + max<LayoutUnit>(0, logic alOffset)); 6471 setPaginationStrut(remainingLogicalHeight + max<LayoutUnit>(0, logic alOffset));
6472 else { 6472 else {
6473 delta += remainingLogicalHeight; 6473 delta += remainingLogicalHeight;
6474 lineBox->setPaginationStrut(remainingLogicalHeight); 6474 lineBox->setPaginationStrut(remainingLogicalHeight);
6475 lineBox->setIsFirstAfterPageBreak(true); 6475 lineBox->setIsFirstAfterPageBreak(true);
6476 } 6476 }
6477 } else if (remainingLogicalHeight == pageLogicalHeight && lineBox != firstRo otBox()) 6477 } else if (remainingLogicalHeight == pageLogicalHeight) {
6478 lineBox->setIsFirstAfterPageBreak(true); 6478 // We're at the very top of a page or column.
6479 if (lineBox != firstRootBox())
6480 lineBox->setIsFirstAfterPageBreak(true);
6481 if (lineBox != firstRootBox() || offsetFromLogicalTopOfFirstPage())
6482 setPageBreak(logicalOffset, lineHeight);
6483 }
6479 } 6484 }
6480 6485
6481 bool RenderBlock::lineWidthForPaginatedLineChanged(RootInlineBox* rootBox, Layou tUnit lineDelta, RenderFlowThread* flowThread) const 6486 bool RenderBlock::lineWidthForPaginatedLineChanged(RootInlineBox* rootBox, Layou tUnit lineDelta, RenderFlowThread* flowThread) const
6482 { 6487 {
6483 if (!flowThread) 6488 if (!flowThread)
6484 return false; 6489 return false;
6485 6490
6486 RenderRegion* currentRegion = regionAtBlockOffset(rootBox->lineTopWithLeadin g() + lineDelta); 6491 RenderRegion* currentRegion = regionAtBlockOffset(rootBox->lineTopWithLeadin g() + lineDelta);
6487 // Just bail if the region didn't change. 6492 // Just bail if the region didn't change.
6488 if (rootBox->containingRegion() == currentRegion) 6493 if (rootBox->containingRegion() == currentRegion)
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
6801 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 6806 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
6802 { 6807 {
6803 showRenderObject(); 6808 showRenderObject();
6804 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 6809 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
6805 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 6810 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
6806 } 6811 }
6807 6812
6808 #endif 6813 #endif
6809 6814
6810 } // namespace WebCore 6815 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/UseCounter.cpp ('k') | Source/core/rendering/RenderMultiColumnBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698