https://github.com/web-platform-tests/wpt
Revision a878a9a9a5d1f4b0160620ba5479ba2c7d2e2373 authored by Javier Fernandez on 07 May 2018, 17:04:09 UTC, committed by Blink WPT Bot on 07 May 2018, 17:13:31 UTC
The definition of intrinsic size excludes explicitly performing layouts to compute the final value. However, it may be necessary to laid out some children to retrieve accurate information about the geometry of the box, specially when some of these children are orthogonal to the box its intrinsic size is being computed. However, the writing-mode specification suggest [1] that auto-sized orthogonal boxes may require to run their sizing phase before any content contribution could be established. The Blink engine discourages performing layouts during intrinsic size computation. In order to address the orthogonal flow issues and get a more accurate sizing, both during intrinsic size and layout phases, the engine performs a pre-layout of all the orthogonal boxes in the layout tree (LocalFrameView::LayoutOrthogonalWritingModeRoot). However, this pre-layout operations doesn't make sense for grid items because the grid areas, the grid items' actual containing blocks, are not computed yet. Hence, we decided to exclude grid items from this pre-layout operation (PrepareOrthogonalWritingModeRootForLayout). With this CL, we follow the same plan Blink has for orthogonal flow boxes, but doing it once the grid items are placed in their corresponding grid areas. Since the grid tracks sizing algorithm has not been run at this stage, the size of the grid areas is estimated based on the track's max-sizing function, in a similar way [2] the algorithm does to deal with orthogonal items during the layout phase. This change is covered by current tests, however, added an additional test to verify we use the max-track sizing as a way to estimate the orthogonal item's block-axis size. [1] https://www.w3.org/TR/css-writing-modes-3/#orthogonal-flows [2] https://drafts.csswg.org/css-grid/#algo-overview Change-Id: I836b92120825916324f94befec6d35263ec84f2b Reviewed-on: https://chromium-review.googlesource.com/1027882 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Manuel Rego Casasnovas <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#556469}
1 parent 644351d
Tip revision: a878a9a9a5d1f4b0160620ba5479ba2c7d2e2373 authored by Javier Fernandez on 07 May 2018, 17:04:09 UTC
[css-grid] Avoid layouts during intrinsic size computation
[css-grid] Avoid layouts during intrinsic size computation
Tip revision: a878a9a
Computing file changes ...