Commit 5bdf8f57 authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by Commit Bot

[LayoutNG] Remove unreachable if-stmt in float utils.

This if-stmt is now invalid as inside the NGExclusionSpace there is
always at least one opportunity which has a block-end offset of
LayoutUnit::Max().

Bug: 635619
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I4ca866e38b4aa764b3181c59e642e2a5be422a55
Reviewed-on: https://chromium-review.googlesource.com/1028351Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553780}
parent 926e9c1d
......@@ -222,18 +222,6 @@ NGPositionedFloat PositionFloat(LayoutUnit origin_block_offset,
NGFragment float_fragment(parent_space.GetWritingMode(),
*layout_result->PhysicalFragment());
// TODO(glebl): This should check for infinite opportunity instead.
// TODO(ikilpatrick): Remove.
if (opportunity.rect.IsEmpty()) {
// Because of the implementation specific of the layout opportunity iterator
// an empty opportunity can mean 2 things:
// - search for layout opportunities is exhausted.
// - opportunity has an infinite size. That's because CS is infinite.
opportunity = NGLayoutOpportunity(NGBfcRect(
/* start_offset */ NGBfcOffset(), /* end_offset */ NGBfcOffset(
float_fragment.InlineSize(), float_fragment.BlockSize())));
}
LayoutUnit float_margin_box_inline_size =
float_fragment.InlineSize() + unpositioned_float->margins.InlineSum();
......
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