Closed Bug 1458753 Opened 7 years ago Closed 7 years ago

[wpt-sync] Sync PR 10810 - [css-grid] Avoid layouts during intrinsic size computation

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 10810 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/w3c/web-platform-tests/pull/10810 Details from upstream follow. Javier Fernandez <jfernandez@igalia.com> wrote: > [css-grid] Avoid layouts during intrinsic size computation > > 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. > > [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 > WPT-Export-Revision: 374b60a38c1a1171a6f575922b0f4289ddf1cbc8
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/06226eb7bab7 [wpt PR 10810] - [css-grid] Avoid layouts during intrinsic size computation, a=testonly https://hg.mozilla.org/integration/mozilla-inbound/rev/d535e7ec3238 [wpt PR 10810] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Ran 1 tests and 7 subtests OK : 1 FAIL : 7 New tests that have failures or other problems: /css/css-grid/layout-algorithm/grid-intrinsic-size-with-orthogonal-items.html .grid 1: FAIL .grid 2: FAIL .grid 3: FAIL .grid 4: FAIL .grid 5: FAIL .grid 6: FAIL .grid 7: FAIL
You need to log in before you can comment on or make changes to this bug.