Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: Source/core/rendering/RenderMultiColumnFlowThread.h

Issue 869583002: [New Multicolumn] Support dynamic insertion and removal of multicol content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: code review Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderMultiColumnFlowThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderMultiColumnFlowThread.h
diff --git a/Source/core/rendering/RenderMultiColumnFlowThread.h b/Source/core/rendering/RenderMultiColumnFlowThread.h
index 1d9f67bdbebdf734c6916fd52866824f4ab26265..54f58b8fd02205479811b2678a168e38db502282 100644
--- a/Source/core/rendering/RenderMultiColumnFlowThread.h
+++ b/Source/core/rendering/RenderMultiColumnFlowThread.h
@@ -60,6 +60,21 @@ class RenderMultiColumnSpannerPlaceholder;
// positioned and sized correctly. The column-span:all element is inside the flow thread, but its
// containing block is the multicol container.
//
+// Some invariants for the render tree structure for multicol:
+// - A multicol container is always a RenderBlockFlow
+// - Every multicol container has one and only one RenderMultiColumnFlowThread
+// - All multicol DOM children and pseudo-elements associated with the multicol container are
+// reparented into the flow thread
+// - The RenderMultiColumnFlowThread is the first child of the multicol container
+// - A multicol container may only have RenderMultiColumnFlowThread, RenderMultiColumnSet and
+// RenderMultiColumnSpannerPlaceholder children
+// - A RenderMultiColumnSet may not be adjacent to another RenderMultiColumnSet; there are no
+// use-cases for it, and there are also implementation limitations behind this requirement.
+// - The flow thread is not in the containing block chain for children that are not to be laid out
+// in columns. This means column spanners and absolutely positioned children whose containing
+// block is outside column content
+// - Each spanner (column-span:all) establishes a RenderMultiColumnSpannerPlaceholder
+//
// The width of the flow thread is the same as the column width. The width of a column set is the
// same as the content box width of the multicol container; in other words exactly enough to hold
// the number of columns to be used, stacked horizontally, plus column gaps between them.
@@ -166,8 +181,8 @@ protected:
private:
void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const;
- void createAndInsertMultiColumnSet();
- void createAndInsertSpannerPlaceholder(RenderBox* spanner);
+ void createAndInsertMultiColumnSet(RenderBox* insertBefore = 0);
+ void createAndInsertSpannerPlaceholder(RenderBox* spanner, RenderBox* insertBefore = 0);
virtual bool descendantIsValidColumnSpanner(RenderObject* descendant) const;
virtual const char* renderName() const override;
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderMultiColumnFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698