| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 void LayoutMultiColumnSet::endFlow(LayoutUnit offsetInFlowThread) | 215 void LayoutMultiColumnSet::endFlow(LayoutUnit offsetInFlowThread) |
| 216 { | 216 { |
| 217 // At this point layout is exactly at the end of this set. Store block offse
t from flow thread | 217 // At this point layout is exactly at the end of this set. Store block offse
t from flow thread |
| 218 // start. This set is now considered "flowed", although we may have to revis
it it later (with | 218 // start. This set is now considered "flowed", although we may have to revis
it it later (with |
| 219 // beginFlow()), e.g. if a subtree in the flow thread has to be laid out ove
r again because the | 219 // beginFlow()), e.g. if a subtree in the flow thread has to be laid out ove
r again because the |
| 220 // initial margin collapsing estimates were wrong. | 220 // initial margin collapsing estimates were wrong. |
| 221 m_fragmentainerGroups.last().setLogicalBottomInFlowThread(offsetInFlowThread
); | 221 m_fragmentainerGroups.last().setLogicalBottomInFlowThread(offsetInFlowThread
); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void LayoutMultiColumnSet::expandToEncompassFlowThreadContentsIfNeeded() | |
| 225 { | |
| 226 ASSERT(multiColumnFlowThread()->lastMultiColumnSet() == this); | |
| 227 // FIXME: this may result in the need for creating additional rows, since th
ere may not be | |
| 228 // enough space remaining in the currently last row. | |
| 229 m_fragmentainerGroups.last().expandToEncompassFlowThreadOverflow(); | |
| 230 } | |
| 231 | |
| 232 void LayoutMultiColumnSet::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalW
idth, LayoutUnit& maxLogicalWidth) const | 224 void LayoutMultiColumnSet::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalW
idth, LayoutUnit& maxLogicalWidth) const |
| 233 { | 225 { |
| 234 minLogicalWidth = m_flowThread->minPreferredLogicalWidth(); | 226 minLogicalWidth = m_flowThread->minPreferredLogicalWidth(); |
| 235 maxLogicalWidth = m_flowThread->maxPreferredLogicalWidth(); | 227 maxLogicalWidth = m_flowThread->maxPreferredLogicalWidth(); |
| 236 } | 228 } |
| 237 | 229 |
| 238 void LayoutMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo
p, LogicalExtentComputedValues& computedValues) const | 230 void LayoutMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo
p, LogicalExtentComputedValues& computedValues) const |
| 239 { | 231 { |
| 240 LayoutUnit logicalHeight; | 232 LayoutUnit logicalHeight; |
| 241 for (const auto& group : m_fragmentainerGroups) | 233 for (const auto& group : m_fragmentainerGroups) |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 317 |
| 326 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const | 318 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const |
| 327 { | 319 { |
| 328 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); | 320 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); |
| 329 if (!isHorizontalWritingMode()) | 321 if (!isHorizontalWritingMode()) |
| 330 return portionRect.transposedRect(); | 322 return portionRect.transposedRect(); |
| 331 return portionRect; | 323 return portionRect; |
| 332 } | 324 } |
| 333 | 325 |
| 334 } | 326 } |
| OLD | NEW |