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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // Remove the spanner placeholder and return true if the specified object is
no longer a valid spanner. | 190 // Remove the spanner placeholder and return true if the specified object is
no longer a valid spanner. |
191 bool removeSpannerPlaceholderIfNoLongerValid(LayoutBox* spannerObjectInFlowT
hread); | 191 bool removeSpannerPlaceholderIfNoLongerValid(LayoutBox* spannerObjectInFlowT
hread); |
192 | 192 |
193 LayoutMultiColumnFlowThread* enclosingFlowThread() const; | 193 LayoutMultiColumnFlowThread* enclosingFlowThread() const; |
194 FragmentationContext* enclosingFragmentationContext() const; | 194 FragmentationContext* enclosingFragmentationContext() const; |
195 LayoutUnit blockOffsetInEnclosingFragmentationContext() const { ASSERT(enclo
singFragmentationContext()); return m_blockOffsetInEnclosingFragmentationContext
; } | 195 LayoutUnit blockOffsetInEnclosingFragmentationContext() const { ASSERT(enclo
singFragmentationContext()); return m_blockOffsetInEnclosingFragmentationContext
; } |
196 | 196 |
197 // If we've run out of columns in the last fragmentainer group (column row),
we have to insert | 197 // If we've run out of columns in the last fragmentainer group (column row),
we have to insert |
198 // another fragmentainer group in order to hold more columns. This means tha
t we're moving to | 198 // another fragmentainer group in order to hold more columns. This means tha
t we're moving to |
199 // the next outer column (in the enclosing fragmentation context). | 199 // the next outer column (in the enclosing fragmentation context). |
200 void appendNewFragmentainerGroupIfNeeded(LayoutUnit offsetInFlowThread); | 200 void appendNewFragmentainerGroupIfNeeded(LayoutUnit bottomOffsetInFlowThread
); |
201 | 201 |
202 // Implementing FragmentationContext: | 202 // Implementing FragmentationContext: |
203 bool isFragmentainerLogicalHeightKnown() final; | 203 bool isFragmentainerLogicalHeightKnown() final; |
204 LayoutUnit fragmentainerLogicalHeightAt(LayoutUnit blockOffset) final; | 204 LayoutUnit fragmentainerLogicalHeightAt(LayoutUnit blockOffset) final; |
205 LayoutUnit remainingLogicalHeightAt(LayoutUnit blockOffset) final; | 205 LayoutUnit remainingLogicalHeightAt(LayoutUnit blockOffset) final; |
206 LayoutMultiColumnFlowThread* associatedFlowThread() final { return this; } | 206 LayoutMultiColumnFlowThread* associatedFlowThread() final { return this; } |
207 | 207 |
208 const char* name() const override { return "LayoutMultiColumnFlowThread"; } | 208 const char* name() const override { return "LayoutMultiColumnFlowThread"; } |
209 | 209 |
210 protected: | 210 protected: |
(...skipping 11 matching lines...) Expand all Loading... |
222 | 222 |
223 void addColumnSetToThread(LayoutMultiColumnSet*) override; | 223 void addColumnSetToThread(LayoutMultiColumnSet*) override; |
224 void willBeRemovedFromTree() override; | 224 void willBeRemovedFromTree() override; |
225 void flowThreadDescendantWasInserted(LayoutObject*) final; | 225 void flowThreadDescendantWasInserted(LayoutObject*) final; |
226 void flowThreadDescendantWillBeRemoved(LayoutObject*) final; | 226 void flowThreadDescendantWillBeRemoved(LayoutObject*) final; |
227 void flowThreadDescendantStyleWillChange(LayoutBox*, StyleDifference, const
ComputedStyle& newStyle) override; | 227 void flowThreadDescendantStyleWillChange(LayoutBox*, StyleDifference, const
ComputedStyle& newStyle) override; |
228 void flowThreadDescendantStyleDidChange(LayoutBox*, StyleDifference, const C
omputedStyle& oldStyle) override; | 228 void flowThreadDescendantStyleDidChange(LayoutBox*, StyleDifference, const C
omputedStyle& oldStyle) override; |
229 void computePreferredLogicalWidths() override; | 229 void computePreferredLogicalWidths() override; |
230 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L
ogicalExtentComputedValues&) const override; | 230 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L
ogicalExtentComputedValues&) const override; |
231 void updateLogicalWidth() override; | 231 void updateLogicalWidth() override; |
232 void contentWasLaidOut(LayoutUnit logicalTopInFlowThreadAfterPagination) ove
rride; | 232 void contentWasLaidOut(LayoutUnit logicalBottomInFlowThreadAfterPagination)
override; |
233 | 233 |
234 // The last set we worked on. It's not to be used as the "current set". The
concept of a | 234 // The last set we worked on. It's not to be used as the "current set". The
concept of a |
235 // "current set" is difficult, since layout may jump back and forth in the t
ree, due to wrong | 235 // "current set" is difficult, since layout may jump back and forth in the t
ree, due to wrong |
236 // top location estimates (due to e.g. margin collapsing), and possibly for
other reasons. | 236 // top location estimates (due to e.g. margin collapsing), and possibly for
other reasons. |
237 LayoutMultiColumnSet* m_lastSetWorkedOn; | 237 LayoutMultiColumnSet* m_lastSetWorkedOn; |
238 | 238 |
239 unsigned m_columnCount; // The used value of column-count | 239 unsigned m_columnCount; // The used value of column-count |
240 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or
0 if auto. | 240 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or
0 if auto. |
241 | 241 |
242 // Cached block offset from this flow thread to the enclosing fragmentation
context, if any. In | 242 // Cached block offset from this flow thread to the enclosing fragmentation
context, if any. In |
243 // the coordinate space of the enclosing fragmentation context. | 243 // the coordinate space of the enclosing fragmentation context. |
244 LayoutUnit m_blockOffsetInEnclosingFragmentationContext; | 244 LayoutUnit m_blockOffsetInEnclosingFragmentationContext; |
245 | 245 |
246 bool m_inBalancingPass; // Set when relayouting for column balancing. | 246 bool m_inBalancingPass; // Set when relayouting for column balancing. |
247 bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate t
he column set heights after layout. | 247 bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate t
he column set heights after layout. |
248 bool m_progressionIsInline; // Always true for regular multicol. False for p
aged-y overflow. | 248 bool m_progressionIsInline; // Always true for regular multicol. False for p
aged-y overflow. |
249 bool m_isBeingEvacuated; | 249 bool m_isBeingEvacuated; |
250 }; | 250 }; |
251 | 251 |
252 // Cannot use DEFINE_LAYOUT_OBJECT_TYPE_CASTS here, because isMultiColumnFlowThr
ead() is defined in | 252 // Cannot use DEFINE_LAYOUT_OBJECT_TYPE_CASTS here, because isMultiColumnFlowThr
ead() is defined in |
253 // LayoutFlowThread, not in LayoutObject. | 253 // LayoutFlowThread, not in LayoutObject. |
254 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, LayoutFlowThread, object, object-
>isLayoutMultiColumnFlowThread(), object.isLayoutMultiColumnFlowThread()); | 254 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, LayoutFlowThread, object, object-
>isLayoutMultiColumnFlowThread(), object.isLayoutMultiColumnFlowThread()); |
255 | 255 |
256 } // namespace blink | 256 } // namespace blink |
257 | 257 |
258 #endif // LayoutMultiColumnFlowThread_h | 258 #endif // LayoutMultiColumnFlowThread_h |
OLD | NEW |