• Oriol Brufau's avatar
    [css-grid] Set available column space before grid items prelayout · 5c2e03af
    Oriol Brufau authored
    Before running the grid track sizing algorithm, there is a prelayout
    step which takes care of the baseline alignment of the items.
    In order to do that, we estimate the size of the grid area, since we
    have not calculated the final size yet.
    
    The problem was that, when calculating this estimate, the available
    column space had not been set yet. So if a column had a percentage track
    sizing function, it would be treated as auto and the estimated size
    would be wrong.
    
    This patch sets the available column space so that we can resolve
    percentage track sizing functions and get a more correct estimate.
    
    Bug: 1121761
    
    TEST=external/wpt/css/css-grid/alignment/self-baseline/grid-self-baseline-008.html
    
    Change-Id: Ic4410b0a80b92afa5adfd62187ec236bd4fd3ba0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2375649
    Commit-Queue: Oriol Brufau <obrufau@igalia.com>
    Reviewed-by: default avatarJavier Fernandez <jfernandez@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#801631}
    5c2e03af
TestExpectations 574 KB