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

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

Issue 267373005: [New Multicolumn] Use the term "content run" in favor of "forced break". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
Index: Source/core/rendering/RenderMultiColumnSet.h
diff --git a/Source/core/rendering/RenderMultiColumnSet.h b/Source/core/rendering/RenderMultiColumnSet.h
index e7079dcac5df15a809ec7710bc075a43a32f89f2..64f6bafa7c2bcc4b8ac1075e4ac5e8dbd229fab1 100644
--- a/Source/core/rendering/RenderMultiColumnSet.h
+++ b/Source/core/rendering/RenderMultiColumnSet.h
@@ -65,6 +65,7 @@ public:
RenderMultiColumnSet* nextSiblingMultiColumnSet() const;
+ LayoutUnit logicalTopInFlowThread() const { return isHorizontalWritingMode() ? flowThreadPortionRect().y() : flowThreadPortionRect().x(); }
LayoutUnit logicalBottomInFlowThread() const { return isHorizontalWritingMode() ? flowThreadPortionRect().maxY() : flowThreadPortionRect().maxX(); }
unsigned computedColumnCount() const { return m_computedColumnCount; }
@@ -86,9 +87,11 @@ public:
void updateMinimumColumnHeight(LayoutUnit height) { m_minimumColumnHeight = std::max(height, m_minimumColumnHeight); }
LayoutUnit minimumColumnHeight() const { return m_minimumColumnHeight; }
- unsigned forcedBreaksCount() const { return m_contentRuns.size(); }
- void clearForcedBreaks();
- void addForcedBreak(LayoutUnit offsetFromFirstPage);
+ // Add a content run, specified by its end position. A content run is appended at every
+ // forced/explicit break and at the end of the column set. The content runs are used to
+ // determine where implicit/soft breaks will occur, in order to calculate an initial column
+ // height.
+ void addContentRun(LayoutUnit endOffsetFromFirstPage);
// (Re-)calculate the column height if it's auto. If 'initial' is set, guess an initial column
// height; otherwise, stretch the column height a tad. Return true if column height changed and
@@ -169,11 +172,11 @@ private:
// A run of content without explicit (forced) breaks; i.e. a flow thread portion between two
// explicit breaks, between flow thread start and an explicit break, between an explicit break
- // and flow thread end, or, in cases when there are no explicit breaks at all: between flow flow
- // thread start and flow thread end. We need to know where the explicit breaks are, in order to
- // figure out where the implicit breaks will end up, so that we get the columns properly
- // balanced. A content run starts out as representing one single column, and will represent one
- // additional column for each implicit break "inserted" there.
+ // and flow thread end, or, in cases when there are no explicit breaks at all: between flow
+ // thread portion start and flow thread portion end. We need to know where the explicit breaks
+ // are, in order to figure out where the implicit breaks will end up, so that we get the columns
+ // properly balanced. A content run starts out as representing one single column, and will
+ // represent one additional column for each implicit break "inserted" there.
class ContentRun {
public:
ContentRun(LayoutUnit breakOffset)
« no previous file with comments | « Source/core/rendering/RenderMultiColumnFlowThread.cpp ('k') | Source/core/rendering/RenderMultiColumnSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698