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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.h

Issue 1381993002: LayoutBlockFlow: rename paginationStrut to paginationStrutPropagatedFromChild. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 5 years, 2 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
index f482c8fbceaf10ddf98138291e17ef41e142e521..7d180d61cbff4ff6f75a71c4f8feb6bf01c413b0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
@@ -218,8 +218,20 @@ public:
LayoutUnit lastLogicalTop, LayoutUnit lastLogicalLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*) const;
bool allowsPaginationStrut() const;
- LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_paginationStrut : LayoutUnit(); }
- void setPaginationStrut(LayoutUnit);
+ // Pagination strut caused by the first line or child block inside this block-level object.
+ //
+ // When the first piece of content (first child block or line) inside an object wants to insert
+ // a soft page or column break, rather than setting a pagination strut on itself it normally
+ // propagates the strut to its containing block (|this|), as long as our implementation can
+ // handle it. The idea is that we want to push the entire object to the next page or column
+ // along with the child content that caused the break, instead of leaving unusable space at the
+ // beginning of the object at the end of one column or page and just push the first line or
+ // block to the next column or page. That would waste space in the container for no good
+ // reason, and it would also be a spec violation, since there is no break opportunity defined
+ // between the content logical top of an object and its first child or line (only *between*
+ // blocks or lines).
+ LayoutUnit paginationStrutPropagatedFromChild() const { return m_rareData ? m_rareData->m_paginationStrutPropagatedFromChild : LayoutUnit(); }
+ void setPaginationStrutPropagatedFromChild(LayoutUnit);
void positionSpannerDescendant(LayoutMultiColumnSpannerPlaceholder& child);
@@ -422,7 +434,6 @@ public:
public:
LayoutBlockFlowRareData(const LayoutBlockFlow* block)
: m_margins(positiveMarginBeforeDefault(block), negativeMarginBeforeDefault(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(block))
- , m_paginationStrut(0)
, m_multiColumnFlowThread(nullptr)
, m_lineBreakToAvoidWidow(-1)
, m_didBreakAtLineToAvoidWidow(false)
@@ -449,7 +460,7 @@ public:
}
MarginValues m_margins;
- LayoutUnit m_paginationStrut;
+ LayoutUnit m_paginationStrutPropagatedFromChild;
LayoutMultiColumnFlowThread* m_multiColumnFlowThread;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698