Index: Source/core/rendering/RenderMultiColumnSet.h |
diff --git a/Source/core/rendering/RenderMultiColumnSet.h b/Source/core/rendering/RenderMultiColumnSet.h |
index d858b23b3d3e61af8d10de58bcd20fa0687dd414..98a68bfa14b2d9323c551de085dfee272016efee 100644 |
--- a/Source/core/rendering/RenderMultiColumnSet.h |
+++ b/Source/core/rendering/RenderMultiColumnSet.h |
@@ -32,24 +32,34 @@ |
namespace WebCore { |
-// RenderMultiColumnSet represents a set of columns that all have the same width and height. By combining runs of same-size columns into a single |
-// object, we significantly reduce the number of unique RenderObjects required to represent columns. |
+// RenderMultiColumnSet represents a set of columns that all have the same width and height. By |
+// combining runs of same-size columns into a single object, we significantly reduce the number of |
+// unique RenderObjects required to represent columns. |
// |
-// A simple multi-column block will have exactly one RenderMultiColumnSet child. A simple paginated multi-column block will have three |
-// RenderMultiColumnSet children: one for the content at the bottom of the first page (whose columns will have a shorter height), one |
-// for the 2nd to n-1 pages, and then one last column set that will hold the shorter columns on the final page (that may have to be balanced |
-// as well). |
+// Column sets are inserted as anonymous children of the actual multicol container (i.e. the |
+// renderer whose style computes to non-auto column-count and/or column-width). |
// |
-// Column spans result in the creation of new column sets as well, since a spanning region has to be placed in between the column sets that |
-// come before and after the span. |
+// Being a "region", a column set has no children on its own, but is merely used to slice a portion |
+// of the tall "single-column" flow thread into actual columns visually, to convert from flow thread |
+// coordinates to visual ones. It is in charge of both positioning columns correctly relatively to |
+// the parent multicol container, and to calculate the correct translation for each column's |
+// contents, and to paint any rules between them. RenderMultiColumnSet objects are used for |
+// painting, hit testing, and any other type of operation that requires mapping from flow thread |
+// coordinates to visual coordinates. |
+// |
+// Column spans result in the creation of new column sets, since a spanning renderer has to be |
+// placed in between the column sets that come before and after the span. |
class RenderMultiColumnSet FINAL : public RenderRegionSet { |
public: |
- static RenderMultiColumnSet* createAnonymous(RenderFlowThread*); |
+ static RenderMultiColumnSet* createAnonymous(RenderFlowThread*, RenderStyle* parentStyle); |
virtual bool isRenderMultiColumnSet() const OVERRIDE { return true; } |
RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(parent()); } |
RenderMultiColumnFlowThread* multiColumnFlowThread() const { return multiColumnBlockFlow()->multiColumnFlowThread(); } |
+ |
+ RenderMultiColumnSet* nextSiblingMultiColumnSet() const; |
+ |
unsigned computedColumnCount() const { return m_computedColumnCount; } |
LayoutUnit computedColumnWidth() const { return m_computedColumnWidth; } |
LayoutUnit computedColumnHeight() const { return m_computedColumnHeight; } |