| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index e94dcbda4058536940c8441f283bce4c019f7ec4..5d01a23a640f4cc49921b5bc55e9a5ee23468ac5 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -4078,7 +4078,16 @@ bool RenderBox::shrinkToAvoidFloats() const
|
|
|
| bool RenderBox::avoidsFloats() const
|
| {
|
| - return isReplaced() || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated();
|
| + // CSS2.1: "The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting
|
| + // context .. must not overlap the margin box of any floats in the same block formatting context."
|
| + // FIXME: The inclusion of horizontal rule and legend elements here isn't covered by any spec.
|
| + return isReplaced() || isHR() || isLegend() || isTable() || (!isFloatingOrOutOfFlowPositioned() && createsBlockFormattingContext());
|
| +}
|
| +
|
| +bool RenderBox::createsBlockFormattingContext() const
|
| +{
|
| + return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
|
| + || style()->specifiesColumns() || isRenderFlowThread() || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElement() || style()->columnSpan();
|
| }
|
|
|
| void RenderBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScope)
|
|
|