• Javier Fernandez's avatar
    [css-grid] Move the pre-layout logic out of the PlaceItemsOnGrid func · b2b9dee1
    Javier Fernandez authored
    The Grid Layout code needs to run a pre-layout for some specific case,
    which include orthogonal and baseline aligned grid items. We decided to
    execute this logic as part of the PlaceItemsOnGrid function, aiming for
    a better performance and simpler and more elegant code.
    
    However, the PlaceItemsOnGrid function is not executed on re-layouts if
    no item has changed its position. Hence, there may be cases where we
    need to repeat the layout of the grid and some of the items involved in
    baseline alignment items are marked for layout as well.
    
    In those cases, like the one described in the bug this CL tries to fix,
    the grid item is assumed as not participating in baseline alignment, but
    we resolve that it actually participates during the layout phase.
    
    This CL tries to solve the issue my moving the pre-layout logic out of
    the PlaceItemOnGrid function, so we ensure both orthogonal and baseline
    alignment are laid out before running the intrinsic size and layout
    operations.
    
    Bug: 853427
    Change-Id: I31d0357e647cccf728376a4abc12e8ea19983822
    Reviewed-on: https://chromium-review.googlesource.com/1104425
    Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
    Reviewed-by: default avatarManuel Rego Casasnovas <rego@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#568783}
    b2b9dee1
grid-self-baseline-and-item-relayout-should-not-crash.html 336 Bytes