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 12 matching lines...) Expand all Loading... | |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/layout/LayoutMultiColumnSet.h" | 27 #include "core/layout/LayoutMultiColumnSet.h" |
28 | 28 |
29 #include "core/editing/PositionWithAffinity.h" | 29 #include "core/editing/PositionWithAffinity.h" |
30 #include "core/layout/LayoutMultiColumnFlowThread.h" | 30 #include "core/layout/LayoutMultiColumnFlowThread.h" |
31 #include "core/layout/MultiColumnFragmentainerGroup.h" | 31 #include "core/layout/MultiColumnFragmentainerGroup.h" |
32 #include "core/paint/MultiColumnSetPainter.h" | 32 #include "core/paint/MultiColumnSetPainter.h" |
33 #include "platform/RuntimeEnabledFeatures.h" | |
33 | 34 |
34 namespace blink { | 35 namespace blink { |
35 | 36 |
36 LayoutMultiColumnSet::LayoutMultiColumnSet(LayoutFlowThread* flowThread) | 37 LayoutMultiColumnSet::LayoutMultiColumnSet(LayoutFlowThread* flowThread) |
37 : LayoutBlockFlow(0) | 38 : LayoutBlockFlow(0) |
38 , m_fragmentainerGroups(*this) | 39 , m_fragmentainerGroups(*this) |
39 , m_flowThread(flowThread) | 40 , m_flowThread(flowThread) |
40 { | 41 { |
41 } | 42 } |
42 | 43 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 clipRect = LayoutRect(minX, minY, maxX - minX, maxY - minY); | 131 clipRect = LayoutRect(minX, minY, maxX - minX, maxY - minY); |
131 } | 132 } |
132 | 133 |
133 return clipRect; | 134 return clipRect; |
134 } | 135 } |
135 | 136 |
136 bool LayoutMultiColumnSet::heightIsAuto() const | 137 bool LayoutMultiColumnSet::heightIsAuto() const |
137 { | 138 { |
138 LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread(); | 139 LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread(); |
139 if (!flowThread->isLayoutPagedFlowThread()) { | 140 if (!flowThread->isLayoutPagedFlowThread()) { |
140 if (multiColumnBlockFlow()->style()->columnFill() == ColumnFillBalance) | 141 if (RuntimeEnabledFeatures::unprefixMulticolEnabled()) { |
Julien - ping for review
2015/05/22 22:09:18
Comment about why we do that and what the behavior
mstensho (USE GERRIT)
2015/05/25 18:47:20
Done.
| |
141 return true; | 142 if (multiColumnBlockFlow()->style()->columnFill() == ColumnFillBalan ce) |
143 return true; | |
144 } | |
142 if (LayoutBox* next = nextSiblingBox()) { | 145 if (LayoutBox* next = nextSiblingBox()) { |
143 if (next->isLayoutMultiColumnSpannerPlaceholder()) { | 146 if (next->isLayoutMultiColumnSpannerPlaceholder()) { |
144 // If we're followed by a spanner, we need to balance. | 147 // If we're followed by a spanner, we need to balance. |
145 return true; | 148 return true; |
146 } | 149 } |
147 } | 150 } |
148 } | 151 } |
149 return !flowThread->columnHeightAvailable(); | 152 return !flowThread->columnHeightAvailable(); |
150 } | 153 } |
151 | 154 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 | 320 |
318 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const | 321 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const |
319 { | 322 { |
320 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread()); | 323 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread()); |
321 if (!isHorizontalWritingMode()) | 324 if (!isHorizontalWritingMode()) |
322 return portionRect.transposedRect(); | 325 return portionRect.transposedRect(); |
323 return portionRect; | 326 return portionRect; |
324 } | 327 } |
325 | 328 |
326 } | 329 } |
OLD | NEW |