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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 void LayoutMultiColumnSet::endFlow(LayoutUnit offsetInFlowThread) | 287 void LayoutMultiColumnSet::endFlow(LayoutUnit offsetInFlowThread) |
288 { | 288 { |
289 // At this point layout is exactly at the end of this set. Store block offse
t from flow thread | 289 // At this point layout is exactly at the end of this set. Store block offse
t from flow thread |
290 // start. This set is now considered "flowed", although we may have to revis
it it later (with | 290 // start. This set is now considered "flowed", although we may have to revis
it it later (with |
291 // beginFlow()), e.g. if a subtree in the flow thread has to be laid out ove
r again because the | 291 // beginFlow()), e.g. if a subtree in the flow thread has to be laid out ove
r again because the |
292 // initial margin collapsing estimates were wrong. | 292 // initial margin collapsing estimates were wrong. |
293 m_fragmentainerGroups.last().setLogicalBottomInFlowThread(offsetInFlowThread
); | 293 m_fragmentainerGroups.last().setLogicalBottomInFlowThread(offsetInFlowThread
); |
294 } | 294 } |
295 | 295 |
| 296 void LayoutMultiColumnSet::layout() |
| 297 { |
| 298 if (recalculateColumnHeight()) |
| 299 multiColumnFlowThread()->setColumnHeightsChanged(); |
| 300 LayoutBlockFlow::layout(); |
| 301 } |
| 302 |
296 void LayoutMultiColumnSet::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalW
idth, LayoutUnit& maxLogicalWidth) const | 303 void LayoutMultiColumnSet::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalW
idth, LayoutUnit& maxLogicalWidth) const |
297 { | 304 { |
298 minLogicalWidth = m_flowThread->minPreferredLogicalWidth(); | 305 minLogicalWidth = m_flowThread->minPreferredLogicalWidth(); |
299 maxLogicalWidth = m_flowThread->maxPreferredLogicalWidth(); | 306 maxLogicalWidth = m_flowThread->maxPreferredLogicalWidth(); |
300 } | 307 } |
301 | 308 |
302 void LayoutMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo
p, LogicalExtentComputedValues& computedValues) const | 309 void LayoutMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo
p, LogicalExtentComputedValues& computedValues) const |
303 { | 310 { |
304 LayoutUnit logicalHeight; | 311 LayoutUnit logicalHeight; |
305 for (const auto& group : m_fragmentainerGroups) | 312 for (const auto& group : m_fragmentainerGroups) |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 | 404 |
398 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const | 405 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const |
399 { | 406 { |
400 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); | 407 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); |
401 if (!isHorizontalWritingMode()) | 408 if (!isHorizontalWritingMode()) |
402 return portionRect.transposedRect(); | 409 return portionRect.transposedRect(); |
403 return portionRect; | 410 return portionRect; |
404 } | 411 } |
405 | 412 |
406 } | 413 } |
OLD | NEW |