• Koji Ishii's avatar
    [LayoutNG] Make floats push line boxes down if no break opportunities can fit · a83d1dd4
    Koji Ishii authored
    When no break opportunities can fit in a line that has floats and/or
    exclusions, such line box should be pushed down to avoid them.
    
    A simple example is "float: left; width: 100%". This patch supports both
    100% case and other cases in slightly different code paths since
    NGLayoutOpportunityIterator handles 100% case differently.
    
    Rewind() has been used for next lines, but this is the first case where
    NGLineBreaker rewinds and process the current line again. Initializing
    states is moved to NextLine() from BreakLine() to make this possible.
    
    This patch also includes fix to avoid processing the same floats twice.
    This should have been an issue when Rewind() is used, but it was not
    handled properly before. The fix isn't very clean though, this should be
    revisited.
    
    Moved from a Reitveld CL[1].
    
    [1] https://codereview.chromium.org/2955843002
    
    Bug: 636993
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
    Change-Id: Ideae5ae00374c500f858bb992d5d3203772829a2
    Reviewed-on: https://chromium-review.googlesource.com/582249
    Commit-Queue: Koji Ishii <kojii@chromium.org>
    Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#492019}
    a83d1dd4
enable-blink-features=LayoutNG 1.4 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.