OLD | NEW |
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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 computedValues.m_position = logicalTop; | 264 computedValues.m_position = logicalTop; |
265 } | 265 } |
266 | 266 |
267 LayoutUnit RenderMultiColumnFlowThread::initialLogicalWidth() const | 267 LayoutUnit RenderMultiColumnFlowThread::initialLogicalWidth() const |
268 { | 268 { |
269 return columnWidth(); | 269 return columnWidth(); |
270 } | 270 } |
271 | 271 |
272 void RenderMultiColumnFlowThread::setPageBreak(LayoutUnit offset, LayoutUnit spa
ceShortage) | 272 void RenderMultiColumnFlowThread::setPageBreak(LayoutUnit offset, LayoutUnit spa
ceShortage) |
273 { | 273 { |
| 274 // Only positive values are interesting (and allowed) here. Zero space short
age may be reported |
| 275 // when we're at the top of a column and the element has zero height. Ignore
this, and also |
| 276 // ignore any negative values, which may occur when we set an early break in
order to honor |
| 277 // widows in the next column. |
| 278 if (spaceShortage <= 0) |
| 279 return; |
| 280 |
274 if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlock
Offset(offset))) | 281 if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlock
Offset(offset))) |
275 multicolSet->recordSpaceShortage(spaceShortage); | 282 multicolSet->recordSpaceShortage(spaceShortage); |
276 } | 283 } |
277 | 284 |
278 void RenderMultiColumnFlowThread::updateMinimumPageHeight(LayoutUnit offset, Lay
outUnit minHeight) | 285 void RenderMultiColumnFlowThread::updateMinimumPageHeight(LayoutUnit offset, Lay
outUnit minHeight) |
279 { | 286 { |
280 if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlock
Offset(offset))) | 287 if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlock
Offset(offset))) |
281 multicolSet->updateMinimumColumnHeight(minHeight); | 288 multicolSet->updateMinimumColumnHeight(minHeight); |
282 } | 289 } |
283 | 290 |
(...skipping 15 matching lines...) Expand all Loading... |
299 } | 306 } |
300 | 307 |
301 bool RenderMultiColumnFlowThread::isPageLogicalHeightKnown() const | 308 bool RenderMultiColumnFlowThread::isPageLogicalHeightKnown() const |
302 { | 309 { |
303 if (RenderMultiColumnSet* columnSet = lastMultiColumnSet()) | 310 if (RenderMultiColumnSet* columnSet = lastMultiColumnSet()) |
304 return columnSet->computedColumnHeight(); | 311 return columnSet->computedColumnHeight(); |
305 return false; | 312 return false; |
306 } | 313 } |
307 | 314 |
308 } | 315 } |
OLD | NEW |