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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; | 173 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; |
174 | 174 |
175 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con
st override; | 175 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con
st override; |
176 | 176 |
177 LayoutMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const final; | 177 LayoutMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const final; |
178 | 178 |
179 void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&); | 179 void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&); |
180 | 180 |
181 bool isInInitialLayoutPass() const { return !m_inBalancingPass; } | 181 bool isInInitialLayoutPass() const { return !m_inBalancingPass; } |
182 | 182 |
| 183 // Skip past a column spanner during flow thread layout. Spanners are not la
id out inside the |
| 184 // flow thread, since the flow thread is not in a spanner's containing block
chain (since the |
| 185 // containing block is the multicol container). |
| 186 void skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlowThread); |
| 187 |
183 bool recalculateColumnHeights(); | 188 bool recalculateColumnHeights(); |
184 | 189 |
185 void columnRuleStyleDidChange(); | 190 void columnRuleStyleDidChange(); |
186 | 191 |
187 // Remove the spanner placeholder and return true if the specified object is
no longer a valid spanner. | 192 // Remove the spanner placeholder and return true if the specified object is
no longer a valid spanner. |
188 bool removeSpannerPlaceholderIfNoLongerValid(LayoutBox* spannerObjectInFlowT
hread); | 193 bool removeSpannerPlaceholderIfNoLongerValid(LayoutBox* spannerObjectInFlowT
hread); |
189 | 194 |
190 LayoutMultiColumnFlowThread* enclosingFlowThread() const; | 195 LayoutMultiColumnFlowThread* enclosingFlowThread() const; |
191 LayoutUnit blockOffsetInEnclosingFlowThread() const { ASSERT(enclosingFlowTh
read()); return m_blockOffsetInEnclosingFlowThread; } | 196 LayoutUnit blockOffsetInEnclosingFlowThread() const { ASSERT(enclosingFlowTh
read()); return m_blockOffsetInEnclosingFlowThread; } |
192 | 197 |
(...skipping 15 matching lines...) Expand all Loading... |
208 | 213 |
209 private: | 214 private: |
210 void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const; | 215 void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const; |
211 void createAndInsertMultiColumnSet(LayoutBox* insertBefore = nullptr); | 216 void createAndInsertMultiColumnSet(LayoutBox* insertBefore = nullptr); |
212 void createAndInsertSpannerPlaceholder(LayoutBox* spannerObjectInFlowThread,
LayoutObject* insertedBeforeInFlowThread); | 217 void createAndInsertSpannerPlaceholder(LayoutBox* spannerObjectInFlowThread,
LayoutObject* insertedBeforeInFlowThread); |
213 void destroySpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder*); | 218 void destroySpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder*); |
214 virtual bool descendantIsValidColumnSpanner(LayoutObject* descendant) const; | 219 virtual bool descendantIsValidColumnSpanner(LayoutObject* descendant) const; |
215 | 220 |
216 void addColumnSetToThread(LayoutMultiColumnSet*) override; | 221 void addColumnSetToThread(LayoutMultiColumnSet*) override; |
217 void willBeRemovedFromTree() override; | 222 void willBeRemovedFromTree() override; |
218 void skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlowThread) overri
de; | |
219 void flowThreadDescendantWasInserted(LayoutObject*) final; | 223 void flowThreadDescendantWasInserted(LayoutObject*) final; |
220 void flowThreadDescendantWillBeRemoved(LayoutObject*) final; | 224 void flowThreadDescendantWillBeRemoved(LayoutObject*) final; |
221 void flowThreadDescendantStyleWillChange(LayoutObject*, StyleDifference, con
st ComputedStyle& newStyle) override; | 225 void flowThreadDescendantStyleWillChange(LayoutObject*, StyleDifference, con
st ComputedStyle& newStyle) override; |
222 void flowThreadDescendantStyleDidChange(LayoutObject*, StyleDifference, cons
t ComputedStyle& oldStyle) override; | 226 void flowThreadDescendantStyleDidChange(LayoutObject*, StyleDifference, cons
t ComputedStyle& oldStyle) override; |
223 void computePreferredLogicalWidths() override; | 227 void computePreferredLogicalWidths() override; |
224 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L
ogicalExtentComputedValues&) const override; | 228 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L
ogicalExtentComputedValues&) const override; |
225 void updateLogicalWidth() override; | 229 void updateLogicalWidth() override; |
226 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) override; | 230 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) override; |
227 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight) overri
de; | 231 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight) overri
de; |
228 bool addForcedColumnBreak(LayoutUnit, LayoutObject* breakChild, bool isBefor
e, LayoutUnit* offsetBreakAdjustment = nullptr) override; | 232 bool addForcedColumnBreak(LayoutUnit, LayoutObject* breakChild, bool isBefor
e, LayoutUnit* offsetBreakAdjustment = nullptr) override; |
(...skipping 16 matching lines...) Expand all Loading... |
245 bool m_isBeingEvacuated; | 249 bool m_isBeingEvacuated; |
246 }; | 250 }; |
247 | 251 |
248 // 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 |
249 // LayoutFlowThread, not in LayoutObject. | 253 // LayoutFlowThread, not in LayoutObject. |
250 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, LayoutFlowThread, object, object-
>isLayoutMultiColumnFlowThread(), object.isLayoutMultiColumnFlowThread()); | 254 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, LayoutFlowThread, object, object-
>isLayoutMultiColumnFlowThread(), object.isLayoutMultiColumnFlowThread()); |
251 | 255 |
252 } // namespace blink | 256 } // namespace blink |
253 | 257 |
254 #endif // LayoutMultiColumnFlowThread_h | 258 #endif // LayoutMultiColumnFlowThread_h |
OLD | NEW |