Commit 4399a458 authored by mstensho@opera.com's avatar mstensho@opera.com

A block that establishes a new formatting context is pushed by floats.

Only block containers that don't establish new formatting contexts are
allowed to ignore (and thus potentially overlap with) floats.

This obviously also applies inside multicol, but we had a check that actively
prevented that. This was some residue from CSS regions support (shared
implementation with multicol), which had a much more sophisticated positioning
implementation, which we've removed ages ago.

BUG=528179
R=jchaffraix@chromium.org

Review URL: https://codereview.chromium.org/1325323002

git-svn-id: svn://svn.chromium.org/blink/trunk@201867 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent bbdbf9ff
Check that an overflow:hidden block dodges floats.
There should be a hotpink square below.
PASS
<!DOCTYPE html>
<script src="../../resources/check-layout.js"></script>
<style>
.part { -webkit-column-break-inside:avoid; width:50px; height:100px; background:hotpink; }
</style>
<p>Check that an overflow:hidden block dodges floats.</p>
<p>There should be a hotpink square below.</p>
<div style="-webkit-columns:3;">
<div class="part" style="float:left;"></div>
<div id="bfc-inflow" class="part" style="overflow:hidden;" data-total-x="58" data-expected-width="50"></div>
</div>
<p id="result"></p>
<script>
checkLayout("#bfc-inflow", document.getElementById("result"));
</script>
......@@ -473,7 +473,7 @@ void LayoutBlockFlow::determineLogicalLeftPositionForChild(LayoutBox& child)
LayoutUnit newPosition = startPosition + childMarginStart;
LayoutUnit positionToAvoidFloats;
if (child.avoidsFloats() && containsFloats() && !flowThreadContainingBlock())
if (child.avoidsFloats() && containsFloats())
positionToAvoidFloats = startOffsetForLine(logicalTopForChild(child), false, logicalHeightForChild(child));
// If the child has an offset from the content edge to avoid floats then use that, otherwise let any negative
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment