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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // RenderMultiColumnSet::recordSpaceShortage()). We'll relayout (to find new bre
ak points and the | 87 // RenderMultiColumnSet::recordSpaceShortage()). We'll relayout (to find new bre
ak points and the |
88 // new lowest amount of space increase that could affect where they occur, in ca
se we need another | 88 // new lowest amount of space increase that could affect where they occur, in ca
se we need another |
89 // round) until we've reached an acceptable height (where everything fits perfec
tly in the number of | 89 // round) until we've reached an acceptable height (where everything fits perfec
tly in the number of |
90 // columns that we have specified). The rule of thumb is that we shouldn't have
to perform more of | 90 // columns that we have specified). The rule of thumb is that we shouldn't have
to perform more of |
91 // such iterations than the number of columns that we have. | 91 // such iterations than the number of columns that we have. |
92 // | 92 // |
93 // For each layout iteration done for column balancing, the flow thread will nee
d a deep layout if | 93 // For each layout iteration done for column balancing, the flow thread will nee
d a deep layout if |
94 // column heights changed in the previous pass, since column height changes may
affect break points | 94 // column heights changed in the previous pass, since column height changes may
affect break points |
95 // and pagination struts anywhere in the tree, and currently no way exists to do
this in a more | 95 // and pagination struts anywhere in the tree, and currently no way exists to do
this in a more |
96 // optimized manner. | 96 // optimized manner. |
| 97 // |
| 98 // There's also some documentation online: |
| 99 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/multi
-column-layout |
97 class RenderMultiColumnFlowThread : public RenderFlowThread { | 100 class RenderMultiColumnFlowThread : public RenderFlowThread { |
98 public: | 101 public: |
99 virtual ~RenderMultiColumnFlowThread(); | 102 virtual ~RenderMultiColumnFlowThread(); |
100 | 103 |
101 static RenderMultiColumnFlowThread* createAnonymous(Document&, RenderStyle*
parentStyle); | 104 static RenderMultiColumnFlowThread* createAnonymous(Document&, RenderStyle*
parentStyle); |
102 | 105 |
103 virtual bool isRenderMultiColumnFlowThread() const override final { return t
rue; } | 106 virtual bool isRenderMultiColumnFlowThread() const override final { return t
rue; } |
104 | 107 |
105 RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(par
ent()); } | 108 RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(par
ent()); } |
106 | 109 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or
0 if auto. | 181 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or
0 if auto. |
179 bool m_inBalancingPass; // Set when relayouting for column balancing. | 182 bool m_inBalancingPass; // Set when relayouting for column balancing. |
180 bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate t
he column set heights after layout. | 183 bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate t
he column set heights after layout. |
181 bool m_progressionIsInline; // Always true for regular multicol. False for p
aged-y overflow. | 184 bool m_progressionIsInline; // Always true for regular multicol. False for p
aged-y overflow. |
182 bool m_isBeingEvacuated; | 185 bool m_isBeingEvacuated; |
183 }; | 186 }; |
184 | 187 |
185 } // namespace blink | 188 } // namespace blink |
186 | 189 |
187 #endif // RenderMultiColumnFlowThread_h | 190 #endif // RenderMultiColumnFlowThread_h |
OLD | NEW |