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 9a0a90f993fd03c929f4d54c7b9a85bba2ee6781..ef6aeb493e2048877e61076b897b8efaa4ad5b95 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
@@ -4124,10 +4124,20 @@ bool LayoutBlockFlow::allowsPaginationStrut() const { |
// If children are inline, allow the strut. We are probably a float. |
if (containingBlockFlow->childrenInline()) |
return true; |
- // If this isn't the first in-flow object, there's a break opportunity before |
- // us, which means that we can allow the strut. |
- if (previousInFlowSiblingBox()) |
- return true; |
+ for (LayoutBox* sibling = previousSiblingBox(); sibling; |
+ sibling = sibling->previousSiblingBox()) { |
+ // What happens on the other side of a spanner is none of our concern, so |
+ // stop here. Since there's no in-flow box between the previous spanner and |
+ // us, there's no class A break point in front of us. We cannot even |
+ // re-propagate pagination struts to our containing block, since the |
+ // containing block starts in a different column row. |
+ if (sibling->isColumnSpanAll()) |
+ return false; |
+ // If this isn't the first in-flow object, there's a break opportunity |
+ // before us, which means that we can allow the strut. |
+ if (!sibling->isFloatingOrOutOfFlowPositioned()) |
+ return true; |
+ } |
// This is a first in-flow child. We'll still allow the strut if it can be |
// re-propagated to our containing block. |
return containingBlockFlow->allowsPaginationStrut(); |