Index: Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp |
index a4cb56f6fa16a237ad5bf135bd997928c4bebbdc..90095513311596801ffb809105021048486e268c 100644 |
--- a/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/Source/core/layout/LayoutBlockFlow.cpp |
@@ -783,7 +783,17 @@ static inline bool shouldSetStrutOnBlock(const LayoutBlockFlow& block, const Roo |
} |
// If we want to break before the block, one final check is needed, since some block object |
leviw_travelin_and_unemployed
2015/09/22 17:20:31
This is no longer one final check, and is really t
mstensho (USE GERRIT)
2015/09/22 18:11:50
I shuffled things around a little bit, hopefully t
|
// types cannot handle struts. |
- return wantsStrutOnBlock && !block.isOutOfFlowPositioned() && !block.isTableCell(); |
+ if (!wantsStrutOnBlock) |
+ return false; |
+ if (block.isOutOfFlowPositioned()) |
leviw_travelin_and_unemployed
2015/09/22 17:20:31
Combine this with the above?
mstensho (USE GERRIT)
2015/09/22 18:11:50
Done.
|
+ return false; |
+ // The block needs to be contained by a block container (and not e.g. a flexbox, or a table |
+ // (which would be the case if the block is a table cell or table caption)). The reason for |
+ // this limitation is simply that block container child layout code is the only place where we |
leviw_travelin_and_unemployed
2015/09/22 17:20:31
as you imply in your description, block container
mstensho (USE GERRIT)
2015/09/22 18:11:50
Yeah, "block container" is CSS sp33k. Changing to
|
+ // pick up the struts and handle them. We could do so in other layout modes as well, but |
+ // currently we don't. |
+ LayoutBlock* containingBlock = block.containingBlock(); |
+ return containingBlock && containingBlock->isLayoutBlockFlow(); |
} |
void LayoutBlockFlow::adjustLinePositionForPagination(RootInlineBox& lineBox, LayoutUnit& delta) |