| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 RenderBlockFlow* multicolBlock = multiColumnBlockFlow(); | 244 RenderBlockFlow* multicolBlock = multiColumnBlockFlow(); |
| 245 RenderStyle* multicolStyle = multicolBlock->style(); | 245 RenderStyle* multicolStyle = multicolBlock->style(); |
| 246 | 246 |
| 247 // Set box logical top. | 247 // Set box logical top. |
| 248 ASSERT(!previousSiblingBox() || !previousSiblingBox()->isRenderMultiColumnSe
t()); // FIXME: multiple set not implemented; need to examine previous set to ca
lculate the correct logical top. | 248 ASSERT(!previousSiblingBox() || !previousSiblingBox()->isRenderMultiColumnSe
t()); // FIXME: multiple set not implemented; need to examine previous set to ca
lculate the correct logical top. |
| 249 setLogicalTop(multicolBlock->borderBefore() + multicolBlock->paddingBefore()
); | 249 setLogicalTop(multicolBlock->borderBefore() + multicolBlock->paddingBefore()
); |
| 250 | 250 |
| 251 // Set box width. | 251 // Set box width. |
| 252 updateLogicalWidth(); | 252 updateLogicalWidth(); |
| 253 | 253 |
| 254 if (multicolBlock->multiColumnFlowThread()->requiresBalancing()) { | 254 if (multiColumnFlowThread()->requiresBalancing()) { |
| 255 // Set maximum column height. We will not stretch beyond this. | 255 // Set maximum column height. We will not stretch beyond this. |
| 256 m_maxColumnHeight = RenderFlowThread::maxLogicalHeight(); | 256 m_maxColumnHeight = RenderFlowThread::maxLogicalHeight(); |
| 257 if (!multicolStyle->logicalHeight().isAuto()) { | 257 if (!multicolStyle->logicalHeight().isAuto()) { |
| 258 m_maxColumnHeight = multicolBlock->computeContentLogicalHeight(multi
colStyle->logicalHeight(), -1); | 258 m_maxColumnHeight = multicolBlock->computeContentLogicalHeight(multi
colStyle->logicalHeight(), -1); |
| 259 if (m_maxColumnHeight == -1) | 259 if (m_maxColumnHeight == -1) |
| 260 m_maxColumnHeight = RenderFlowThread::maxLogicalHeight(); | 260 m_maxColumnHeight = RenderFlowThread::maxLogicalHeight(); |
| 261 } | 261 } |
| 262 if (!multicolStyle->logicalMaxHeight().isUndefined()) { | 262 if (!multicolStyle->logicalMaxHeight().isUndefined()) { |
| 263 LayoutUnit logicalMaxHeight = multicolBlock->computeContentLogicalHe
ight(multicolStyle->logicalMaxHeight(), -1); | 263 LayoutUnit logicalMaxHeight = multicolBlock->computeContentLogicalHe
ight(multicolStyle->logicalMaxHeight(), -1); |
| 264 if (logicalMaxHeight != -1 && m_maxColumnHeight > logicalMaxHeight) | 264 if (logicalMaxHeight != -1 && m_maxColumnHeight > logicalMaxHeight) |
| 265 m_maxColumnHeight = logicalMaxHeight; | 265 m_maxColumnHeight = logicalMaxHeight; |
| 266 } | 266 } |
| 267 m_maxColumnHeight = heightAdjustedForSetOffset(m_maxColumnHeight); | 267 m_maxColumnHeight = heightAdjustedForSetOffset(m_maxColumnHeight); |
| 268 m_computedColumnHeight = 0; // Restart balancing. | 268 m_computedColumnHeight = 0; // Restart balancing. |
| 269 } else { | 269 } else { |
| 270 setAndConstrainColumnHeight(heightAdjustedForSetOffset(multicolBlock->mu
ltiColumnFlowThread()->columnHeightAvailable())); | 270 setAndConstrainColumnHeight(heightAdjustedForSetOffset(multiColumnFlowTh
read()->columnHeightAvailable())); |
| 271 } | 271 } |
| 272 | 272 |
| 273 clearForcedBreaks(); | 273 clearForcedBreaks(); |
| 274 | 274 |
| 275 // Nuke previously stored minimum column height. Contents may have changed f
or all we know. | 275 // Nuke previously stored minimum column height. Contents may have changed f
or all we know. |
| 276 m_minimumColumnHeight = 0; | 276 m_minimumColumnHeight = 0; |
| 277 } | 277 } |
| 278 | 278 |
| 279 void RenderMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo
p, LogicalExtentComputedValues& computedValues) const | 279 void RenderMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo
p, LogicalExtentComputedValues& computedValues) const |
| 280 { | 280 { |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 fragments.append(fragment); | 594 fragments.append(fragment); |
| 595 } | 595 } |
| 596 } | 596 } |
| 597 | 597 |
| 598 const char* RenderMultiColumnSet::renderName() const | 598 const char* RenderMultiColumnSet::renderName() const |
| 599 { | 599 { |
| 600 return "RenderMultiColumnSet"; | 600 return "RenderMultiColumnSet"; |
| 601 } | 601 } |
| 602 | 602 |
| 603 } | 603 } |
| OLD | NEW |