Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
index 7adac6d84776a2d3c2acef072ce02adae93ab9d8..0b933e61311a81e0adf7f8858f8990c2b47771f9 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
@@ -1772,8 +1772,7 @@ LayoutUnit LayoutBlockFlow::collapseMargins(LayoutBox& child, |
// If margins would pull us past the top of the next page, then we need to |
// pull back and pretend like the margins collapsed into the page edge. |
LayoutState* layoutState = view()->layoutState(); |
- if (layoutState->isPaginated() && |
- isPageLogicalHeightKnown(beforeCollapseLogicalTop) && |
+ if (layoutState->isPaginated() && isPageLogicalHeightKnown() && |
logicalTop > beforeCollapseLogicalTop) { |
LayoutUnit oldLogicalTop = logicalTop; |
logicalTop = |
@@ -2065,7 +2064,7 @@ LayoutUnit LayoutBlockFlow::estimateLogicalTopPosition( |
// Adjust logicalTopEstimate down to the next page if the margins are so large |
// that we don't fit on the current page. |
LayoutState* layoutState = view()->layoutState(); |
- if (layoutState->isPaginated() && isPageLogicalHeightKnown(logicalHeight()) && |
+ if (layoutState->isPaginated() && isPageLogicalHeightKnown() && |
logicalTopEstimate > logicalHeight()) |
logicalTopEstimate = |
std::min(logicalTopEstimate, nextPageLogicalTop(logicalHeight())); |