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

Side by Side Diff: Source/core/layout/LayoutMultiColumnSet.cpp

Issue 1287113002: Clean up PageBoundaryRule enum. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.cpp ('k') | no next file » | 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 LayoutUnit LayoutMultiColumnSet::pageRemainingLogicalHeightForOffset(LayoutUnit offsetInFlowThread, PageBoundaryRule pageBoundaryRule) const 76 LayoutUnit LayoutMultiColumnSet::pageRemainingLogicalHeightForOffset(LayoutUnit offsetInFlowThread, PageBoundaryRule pageBoundaryRule) const
77 { 77 {
78 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtFlowThreadOff set(offsetInFlowThread); 78 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtFlowThreadOff set(offsetInFlowThread);
79 LayoutUnit pageLogicalHeight = row.logicalHeight(); 79 LayoutUnit pageLogicalHeight = row.logicalHeight();
80 ASSERT(pageLogicalHeight); // It's not allowed to call this method if the he ight is unknown. 80 ASSERT(pageLogicalHeight); // It's not allowed to call this method if the he ight is unknown.
81 LayoutUnit pageLogicalBottom = row.columnLogicalTopForOffset(offsetInFlowThr ead) + pageLogicalHeight; 81 LayoutUnit pageLogicalBottom = row.columnLogicalTopForOffset(offsetInFlowThr ead) + pageLogicalHeight;
82 LayoutUnit remainingLogicalHeight = pageLogicalBottom - offsetInFlowThread; 82 LayoutUnit remainingLogicalHeight = pageLogicalBottom - offsetInFlowThread;
83 83
84 if (pageBoundaryRule == IncludePageBoundary) { 84 if (pageBoundaryRule == AssociateWithFormerPage) {
85 // If IncludePageBoundary is set, the line exactly on the top edge of a 85 // An offset exactly at a column boundary will act as being part of the former column in
86 // column will act as being part of the previous column. 86 // question (i.e. no remaining space), rather than being part of the lat ter (i.e. one whole
87 // column length of remaining space).
87 remainingLogicalHeight = intMod(remainingLogicalHeight, pageLogicalHeigh t); 88 remainingLogicalHeight = intMod(remainingLogicalHeight, pageLogicalHeigh t);
88 } 89 }
89 return remainingLogicalHeight; 90 return remainingLogicalHeight;
90 } 91 }
91 92
92 bool LayoutMultiColumnSet::isPageLogicalHeightKnown() const 93 bool LayoutMultiColumnSet::isPageLogicalHeightKnown() const
93 { 94 {
94 return firstFragmentainerGroup().logicalHeight(); 95 return firstFragmentainerGroup().logicalHeight();
95 } 96 }
96 97
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 345
345 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const 346 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const
346 { 347 {
347 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread()); 348 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread());
348 if (!isHorizontalWritingMode()) 349 if (!isHorizontalWritingMode())
349 return portionRect.transposedRect(); 350 return portionRect.transposedRect();
350 return portionRect; 351 return portionRect;
351 } 352 }
352 353
353 } 354 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698