| 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 23 matching lines...) Expand all Loading... |
| 34 // RenderMultiColumnSet represents a set of columns that all have the same width
and height. By combining runs of same-size columns into a single | 34 // RenderMultiColumnSet represents a set of columns that all have the same width
and height. By combining runs of same-size columns into a single |
| 35 // object, we significantly reduce the number of unique RenderObjects required t
o represent columns. | 35 // object, we significantly reduce the number of unique RenderObjects required t
o represent columns. |
| 36 // | 36 // |
| 37 // A simple multi-column block will have exactly one RenderMultiColumnSet child.
A simple paginated multi-column block will have three | 37 // A simple multi-column block will have exactly one RenderMultiColumnSet child.
A simple paginated multi-column block will have three |
| 38 // RenderMultiColumnSet children: one for the content at the bottom of the first
page (whose columns will have a shorter height), one | 38 // RenderMultiColumnSet children: one for the content at the bottom of the first
page (whose columns will have a shorter height), one |
| 39 // for the 2nd to n-1 pages, and then one last column set that will hold the sho
rter columns on the final page (that may have to be balanced | 39 // for the 2nd to n-1 pages, and then one last column set that will hold the sho
rter columns on the final page (that may have to be balanced |
| 40 // as well). | 40 // as well). |
| 41 // | 41 // |
| 42 // Column spans result in the creation of new column sets as well, since a spann
ing region has to be placed in between the column sets that | 42 // Column spans result in the creation of new column sets as well, since a spann
ing region has to be placed in between the column sets that |
| 43 // come before and after the span. | 43 // come before and after the span. |
| 44 class RenderMultiColumnSet : public RenderRegionSet { | 44 class RenderMultiColumnSet FINAL : public RenderRegionSet { |
| 45 public: | 45 public: |
| 46 static RenderMultiColumnSet* createAnonymous(RenderFlowThread*); | 46 static RenderMultiColumnSet* createAnonymous(RenderFlowThread*); |
| 47 | 47 |
| 48 virtual bool isRenderMultiColumnSet() const OVERRIDE { return true; } | 48 virtual bool isRenderMultiColumnSet() const OVERRIDE { return true; } |
| 49 | 49 |
| 50 unsigned computedColumnCount() const { return m_computedColumnCount; } | 50 unsigned computedColumnCount() const { return m_computedColumnCount; } |
| 51 LayoutUnit computedColumnWidth() const { return m_computedColumnWidth; } | 51 LayoutUnit computedColumnWidth() const { return m_computedColumnWidth; } |
| 52 LayoutUnit computedColumnHeight() const { return m_computedColumnHeight; } | 52 LayoutUnit computedColumnHeight() const { return m_computedColumnHeight; } |
| 53 | 53 |
| 54 void setComputedColumnWidthAndCount(LayoutUnit width, unsigned count) | 54 void setComputedColumnWidthAndCount(LayoutUnit width, unsigned count) |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 return static_cast<const RenderMultiColumnSet*>(object); | 150 return static_cast<const RenderMultiColumnSet*>(object); |
| 151 } | 151 } |
| 152 | 152 |
| 153 // This will catch anyone doing an unnecessary cast. | 153 // This will catch anyone doing an unnecessary cast. |
| 154 void toRenderMultiColumnSet(const RenderMultiColumnSet*); | 154 void toRenderMultiColumnSet(const RenderMultiColumnSet*); |
| 155 | 155 |
| 156 } // namespace WebCore | 156 } // namespace WebCore |
| 157 | 157 |
| 158 #endif // RenderMultiColumnSet_h | 158 #endif // RenderMultiColumnSet_h |
| 159 | 159 |
| OLD | NEW |