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

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

Issue 1762983002: Only honor break-* values when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update some unit tests too Created 4 years, 10 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: third_party/WebKit/Source/core/layout/LayoutBox.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h
index 4b6a376638ab0a609520c227301a0a1eed5f6bbe..536d68c8429a59425d366e36b02f4809ebba93a6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -620,6 +620,20 @@ public:
m_rareData->m_paginationStrut = LayoutUnit();
}
+ // Is the specified break-before or break-after value supported on this object? It needs to be
+ // in-flow all the way up to a fragmentation context that supports the specified value.
+ bool isBreakBetweenControllable(EBreak) const;
+
+ // Is the specified break-inside value supported on this object? It needs to be contained by a
+ // fragmentation context that supports the specified value.
+ bool isBreakInsideControllable(EBreak) const;
+
+ EBreak breakAfter() const;
+ EBreak breakBefore() const;
+ EBreak breakInside() const;
+
+ static bool isForcedFragmentainerBreakValue(EBreak);
+
bool hasForcedBreakBefore() const;
bool hasForcedBreakAfter() const;
@@ -1135,6 +1149,16 @@ inline void LayoutBox::setInlineBoxWrapper(InlineBox* boxWrapper)
m_inlineBoxWrapper = boxWrapper;
}
+inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue)
+{
+ return breakValue == BreakColumn
+ || breakValue == BreakLeft
+ || breakValue == BreakPage
+ || breakValue == BreakRecto
+ || breakValue == BreakRight
+ || breakValue == BreakVerso;
+}
+
} // namespace blink
#endif // LayoutBox_h

Powered by Google App Engine
This is Rietveld 408576698