| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 bool LayoutMultiColumnSet::heightIsAuto() const | 270 bool LayoutMultiColumnSet::heightIsAuto() const |
| 271 { | 271 { |
| 272 LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread(); | 272 LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread(); |
| 273 if (!flowThread->isLayoutPagedFlowThread()) { | 273 if (!flowThread->isLayoutPagedFlowThread()) { |
| 274 // If support for the column-fill property isn't enabled, we want to beh
ave as if | 274 // If support for the column-fill property isn't enabled, we want to beh
ave as if |
| 275 // column-fill were auto, so that multicol containers with specified hei
ght don't get their | 275 // column-fill were auto, so that multicol containers with specified hei
ght don't get their |
| 276 // columns balanced (auto-height multicol containers will still get thei
r columns balanced, | 276 // columns balanced (auto-height multicol containers will still get thei
r columns balanced, |
| 277 // even if column-fill isn't 'balance' - in accordance with the spec). P
retending that | 277 // even if column-fill isn't 'balance' - in accordance with the spec). P
retending that |
| 278 // column-fill is auto also matches the old multicol implementation, whi
ch has no support | 278 // column-fill is auto also matches the old multicol implementation, whi
ch has no support |
| 279 // for this property. | 279 // for this property. |
| 280 if (RuntimeEnabledFeatures::columnFillEnabled()) { | 280 if (multiColumnBlockFlow()->style()->getColumnFill() == ColumnFillBalanc
e) |
| 281 if (multiColumnBlockFlow()->style()->getColumnFill() == ColumnFillBa
lance) | 281 return true; |
| 282 return true; | |
| 283 } | |
| 284 if (LayoutBox* next = nextSiblingBox()) { | 282 if (LayoutBox* next = nextSiblingBox()) { |
| 285 if (next->isLayoutMultiColumnSpannerPlaceholder()) { | 283 if (next->isLayoutMultiColumnSpannerPlaceholder()) { |
| 286 // If we're followed by a spanner, we need to balance. | 284 // If we're followed by a spanner, we need to balance. |
| 287 return true; | 285 return true; |
| 288 } | 286 } |
| 289 } | 287 } |
| 290 } | 288 } |
| 291 return !flowThread->columnHeightAvailable(); | 289 return !flowThread->columnHeightAvailable(); |
| 292 } | 290 } |
| 293 | 291 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 470 |
| 473 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const | 471 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const |
| 474 { | 472 { |
| 475 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); | 473 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); |
| 476 if (!isHorizontalWritingMode()) | 474 if (!isHorizontalWritingMode()) |
| 477 return portionRect.transposedRect(); | 475 return portionRect.transposedRect(); |
| 478 return portionRect; | 476 return portionRect; |
| 479 } | 477 } |
| 480 | 478 |
| 481 } // namespace blink | 479 } // namespace blink |
| OLD | NEW |