• Javier Fernandez's avatar
    [css-grid] Avoid persistent items list to perform the pre-layout · 14ae5724
    Javier Fernandez authored
    We defined two LayoutBox elements list to identify grid items that need
    to perform a pre-layout: orthogonal and baseline items. We were
    creating these lists as part of the PlaceItemsOnGrid logic.
    
    This design has 2 main problems that lead to bug 855844, and likely
    many other:
      * The PlaceItemsOnGrid function is not executed completely if the
    grid is not dirty.
      * There might be items in the list that should not be there due to
    style changes; also, some should have been added for the same reason.
    
    The simplest and safest approach is to avoid such lists and identify
    the items needing pre-layout during the first steps of the grid's
    layout logic.
    
    Since style changes affecting either the writing-mode or the Self
    Alignment properties of a grid item will force a re-layout of the grid
    it belongs to, we can be sure that all the grid items will perform the
    pre-layout, if they needed to.
    
    Bug: 855844
    Change-Id: I396524b0fc6a4816bcb7962997f129a325c04934
    Reviewed-on: https://chromium-review.googlesource.com/1122623
    Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
    Reviewed-by: default avatarManuel Rego Casasnovas <rego@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#572162}
    14ae5724
grid-self-baseline-followed-by-item-style-change-should-not-crash.html 1.27 KB