| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 // to encompass that remaining height and overflow. The idea is that we will
generate | 296 // to encompass that remaining height and overflow. The idea is that we will
generate |
| 297 // additional columns and pages to hold that overflow, since people do write
bad | 297 // additional columns and pages to hold that overflow, since people do write
bad |
| 298 // content like <body style="height:0px"> in multi-column layouts. | 298 // content like <body style="height:0px"> in multi-column layouts. |
| 299 bool isHorizontal = flowThread()->isHorizontalWritingMode(); | 299 bool isHorizontal = flowThread()->isHorizontalWritingMode(); |
| 300 LayoutUnit logicalTopOffset = isHorizontal ? rect.y() : rect.x(); | 300 LayoutUnit logicalTopOffset = isHorizontal ? rect.y() : rect.x(); |
| 301 LayoutRect layoutRect = flowThread()->layoutOverflowRect(); | 301 LayoutRect layoutRect = flowThread()->layoutOverflowRect(); |
| 302 LayoutUnit logicalHeightWithOverflow = (isHorizontal ? layoutRect.maxY() : l
ayoutRect.maxX()) - logicalTopOffset; | 302 LayoutUnit logicalHeightWithOverflow = (isHorizontal ? layoutRect.maxY() : l
ayoutRect.maxX()) - logicalTopOffset; |
| 303 setFlowThreadPortionRect(LayoutRect(rect.x(), rect.y(), isHorizontal ? rect.
width() : logicalHeightWithOverflow, isHorizontal ? logicalHeightWithOverflow :
rect.height())); | 303 setFlowThreadPortionRect(LayoutRect(rect.x(), rect.y(), isHorizontal ? rect.
width() : logicalHeightWithOverflow, isHorizontal ? logicalHeightWithOverflow :
rect.height())); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void RenderMultiColumnSet::layout() |
| 307 { |
| 308 RenderRegion::layout(); |
| 309 |
| 310 if (!nextSiblingMultiColumnSet()) { |
| 311 // This is the last set, i.e. the last region. Seize the opportunity to
validate them. |
| 312 multiColumnFlowThread()->validateRegions(); |
| 313 } |
| 314 } |
| 315 |
| 306 void RenderMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo
p, LogicalExtentComputedValues& computedValues) const | 316 void RenderMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo
p, LogicalExtentComputedValues& computedValues) const |
| 307 { | 317 { |
| 308 computedValues.m_extent = m_computedColumnHeight; | 318 computedValues.m_extent = m_computedColumnHeight; |
| 309 computedValues.m_position = logicalTop; | 319 computedValues.m_position = logicalTop; |
| 310 } | 320 } |
| 311 | 321 |
| 312 LayoutUnit RenderMultiColumnSet::columnGap() const | 322 LayoutUnit RenderMultiColumnSet::columnGap() const |
| 313 { | 323 { |
| 314 RenderBlockFlow* parentBlock = multiColumnBlockFlow(); | 324 RenderBlockFlow* parentBlock = multiColumnBlockFlow(); |
| 315 if (parentBlock->style()->hasNormalColumnGap()) | 325 if (parentBlock->style()->hasNormalColumnGap()) |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 fragments.append(fragment); | 631 fragments.append(fragment); |
| 622 } | 632 } |
| 623 } | 633 } |
| 624 | 634 |
| 625 const char* RenderMultiColumnSet::renderName() const | 635 const char* RenderMultiColumnSet::renderName() const |
| 626 { | 636 { |
| 627 return "RenderMultiColumnSet"; | 637 return "RenderMultiColumnSet"; |
| 628 } | 638 } |
| 629 | 639 |
| 630 } | 640 } |
| OLD | NEW |