Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
index cc651c30bedbc4ec0176463249145f2bd5c54006..3421c7efb0694a392f26f39ac3265166f188eaf6 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
@@ -1907,8 +1907,8 @@ bool LayoutBox::hasForcedBreakBefore() const |
LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
bool checkColumnBreaks = flowThread; |
bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->pageLogicalHeight(); // TODO(mstensho): Once columns can print, we have to check this. |
- bool checkBeforeAlways = (checkColumnBreaks && style()->columnBreakBefore() == PBALWAYS) |
- || (checkPageBreaks && style()->pageBreakBefore() == PBALWAYS); |
+ bool checkBeforeAlways = (checkColumnBreaks && style()->breakBefore() == BreakColumn) |
+ || (checkPageBreaks && style()->breakBefore() == BreakPage); |
return checkBeforeAlways && isForcedBreakAllowed(this); |
} |
@@ -1917,8 +1917,8 @@ bool LayoutBox::hasForcedBreakAfter() const |
LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
bool checkColumnBreaks = flowThread; |
bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->pageLogicalHeight(); // TODO(mstensho): Once columns can print, we have to check this. |
- bool checkAfterAlways = (checkColumnBreaks && style()->columnBreakAfter() == PBALWAYS) |
- || (checkPageBreaks && style()->pageBreakAfter() == PBALWAYS); |
+ bool checkAfterAlways = (checkColumnBreaks && style()->breakAfter() == BreakColumn) |
+ || (checkPageBreaks && style()->breakAfter() == BreakPage); |
return checkAfterAlways && isForcedBreakAllowed(this); |
} |
@@ -4224,8 +4224,9 @@ LayoutBox::PaginationBreakability LayoutBox::paginationBreakability() const |
bool checkColumnBreaks = flowThreadContainingBlock(); |
bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->pageLogicalHeight(); |
- bool isUnsplittable = (checkColumnBreaks && style()->columnBreakInside() == PBAVOID) |
- || (checkPageBreaks && style()->pageBreakInside() == PBAVOID); |
+ EBreak breakInside = style()->breakInside(); |
+ bool isUnsplittable = (checkColumnBreaks && (breakInside == BreakAvoid || breakInside == BreakAvoidColumn)) |
+ || (checkPageBreaks && (breakInside == BreakAvoid || breakInside == BreakAvoidPage)); |
if (isUnsplittable) |
return AvoidBreaks; |
return AllowAnyBreaks; |