| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace WebCore { |
| 33 | 33 |
| 34 class RenderMultiColumnFlowThread FINAL : public RenderFlowThread { | 34 class RenderMultiColumnFlowThread FINAL : public RenderFlowThread { |
| 35 public: | 35 public: |
| 36 virtual ~RenderMultiColumnFlowThread(); | 36 virtual ~RenderMultiColumnFlowThread(); |
| 37 | 37 |
| 38 static RenderMultiColumnFlowThread* createAnonymous(Document&, RenderStyle*
parentStyle); | 38 static RenderMultiColumnFlowThread* createAnonymous(Document&, RenderStyle*
parentStyle); |
| 39 | 39 |
| 40 RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(par
ent()); } | 40 RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(par
ent()); } |
| 41 |
| 42 // Populate the flow thread with what's currently its siblings. Called when
a regular block |
| 43 // becomes a multicol container. |
| 44 void populate(); |
| 45 |
| 46 // Empty the flow thread by moving everything to the parent. Remove all mult
icol specific |
| 47 // renderers. Then destroy the flow thread. Called when a multicol container
becomes a regular |
| 48 // block. |
| 49 void evacuateAndDestroy(); |
| 50 |
| 41 unsigned columnCount() const { return m_columnCount; } | 51 unsigned columnCount() const { return m_columnCount; } |
| 42 LayoutUnit columnWidth() const { return m_columnWidth; } | 52 LayoutUnit columnWidth() const { return m_columnWidth; } |
| 43 LayoutUnit columnHeightAvailable() const { return m_columnHeightAvailable; } | 53 LayoutUnit columnHeightAvailable() const { return m_columnHeightAvailable; } |
| 44 void setColumnHeightAvailable(LayoutUnit available) { m_columnHeightAvailabl
e = available; } | 54 void setColumnHeightAvailable(LayoutUnit available) { m_columnHeightAvailabl
e = available; } |
| 45 bool requiresBalancing() const { return !columnHeightAvailable() || multiCol
umnBlockFlow()->style()->columnFill() == ColumnFillBalance; } | 55 bool requiresBalancing() const { return !columnHeightAvailable() || multiCol
umnBlockFlow()->style()->columnFill() == ColumnFillBalance; } |
| 46 | 56 |
| 47 void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&); | 57 void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&); |
| 48 bool computeColumnCountAndWidth(); | 58 bool computeColumnCountAndWidth(); |
| 49 bool recalculateColumnHeights(); | 59 bool recalculateColumnHeights(); |
| 50 | 60 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 64 LayoutUnit m_columnWidth; // The used value of column-width | 74 LayoutUnit m_columnWidth; // The used value of column-width |
| 65 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or
0 if auto. | 75 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or
0 if auto. |
| 66 bool m_inBalancingPass; // Set when relayouting for column balancing. | 76 bool m_inBalancingPass; // Set when relayouting for column balancing. |
| 67 bool m_needsRebalancing; | 77 bool m_needsRebalancing; |
| 68 }; | 78 }; |
| 69 | 79 |
| 70 } // namespace WebCore | 80 } // namespace WebCore |
| 71 | 81 |
| 72 #endif // RenderMultiColumnFlowThread_h | 82 #endif // RenderMultiColumnFlowThread_h |
| 73 | 83 |
| OLD | NEW |