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

Unified Diff: Source/core/layout/LayoutFlowThread.cpp

Issue 1282353002: Prepare height calculation methods in LayoutFlowThread for nested multicol. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/layout/LayoutMultiColumnFlowThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutFlowThread.cpp
diff --git a/Source/core/layout/LayoutFlowThread.cpp b/Source/core/layout/LayoutFlowThread.cpp
index 34e5d7793c5f95f03bd9b7239199d10e45d43fa7..57a1940640c008677dcea5bd42f5c3e9bb15315f 100644
--- a/Source/core/layout/LayoutFlowThread.cpp
+++ b/Source/core/layout/LayoutFlowThread.cpp
@@ -116,27 +116,18 @@ LayoutUnit LayoutFlowThread::pageLogicalHeightForOffset(LayoutUnit offset)
{
LayoutMultiColumnSet* columnSet = columnSetAtBlockOffset(offset);
if (!columnSet)
- return 0;
+ return LayoutUnit();
- return columnSet->pageLogicalHeight();
+ return columnSet->pageLogicalHeightForOffset(offset);
}
LayoutUnit LayoutFlowThread::pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBoundaryRule pageBoundaryRule)
{
LayoutMultiColumnSet* columnSet = columnSetAtBlockOffset(offset);
if (!columnSet)
- return 0;
-
- LayoutUnit pageLogicalTop = columnSet->pageLogicalTopForOffset(offset);
- LayoutUnit pageLogicalHeight = columnSet->pageLogicalHeight();
- LayoutUnit pageLogicalBottom = pageLogicalTop + pageLogicalHeight;
- LayoutUnit remainingHeight = pageLogicalBottom - offset;
- if (pageBoundaryRule == IncludePageBoundary) {
- // If IncludePageBoundary is set, the line exactly on the top edge of a
- // columnSet will act as being part of the previous columnSet.
- remainingHeight = intMod(remainingHeight, pageLogicalHeight);
- }
- return remainingHeight;
+ return LayoutUnit();
+
+ return columnSet->pageRemainingLogicalHeightForOffset(offset, pageBoundaryRule);
}
void LayoutFlowThread::generateColumnSetIntervalTree()
« no previous file with comments | « no previous file | Source/core/layout/LayoutMultiColumnFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698