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

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

Issue 399423006: Move widow-avoiding code from RenderBlock down to RenderBlockFlow. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/RenderBlock.cpp ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockFlow.h
diff --git a/Source/core/rendering/RenderBlockFlow.h b/Source/core/rendering/RenderBlockFlow.h
index 71be858e4a55902c2e011c35bc1d9da3170707af..7b2d9f6413a6f4dc029507bccd3f336bb16de88d 100644
--- a/Source/core/rendering/RenderBlockFlow.h
+++ b/Source/core/rendering/RenderBlockFlow.h
@@ -314,6 +314,14 @@ private:
bool shouldRelayoutForPagination(LayoutUnit& pageLogicalHeight, LayoutUnit layoutOverflowLogicalBottom) const;
void setColumnCountAndHeight(unsigned count, LayoutUnit pageLogicalHeight);
+ bool shouldBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData->m_lineBreakToAvoidWidow >= 0; }
+ void clearShouldBreakAtLineToAvoidWidow() const;
+ int lineBreakToAvoidWidow() const { return m_rareData ? m_rareData->m_lineBreakToAvoidWidow : -1; }
+ void setBreakAtLineToAvoidWidow(int);
+ void clearDidBreakAtLineToAvoidWidow();
+ void setDidBreakAtLineToAvoidWidow();
+ bool didBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData->m_didBreakAtLineToAvoidWidow; }
+
public:
struct FloatWithRect {
FloatWithRect(RenderBox* f)
@@ -363,6 +371,8 @@ public:
: m_margins(positiveMarginBeforeDefault(block), negativeMarginBeforeDefault(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(block))
, m_paginationStrut(0)
, m_multiColumnFlowThread(0)
+ , m_lineBreakToAvoidWidow(-1)
+ , m_didBreakAtLineToAvoidWidow(false)
, m_discardMarginBefore(false)
, m_discardMarginAfter(false)
{
@@ -390,6 +400,8 @@ public:
RenderMultiColumnFlowThread* m_multiColumnFlowThread;
+ int m_lineBreakToAvoidWidow;
+ bool m_didBreakAtLineToAvoidWidow : 1;
bool m_discardMarginBefore : 1;
bool m_discardMarginAfter : 1;
};
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698