Commit Graph
5 Commits
Author SHA1 Message Date
Javier Fernandez 7288c89895 Bug 1483770 [wpt PR 12512] - [css-grid] Distribution offset doesn't account for non-spanning items, a=testonly
Automatic update from web-platform-tests[css-grid] Distribution offset doesn't account for non-spanning items

We recenttly changed the track sizing algorithm so that it considers the
offsets added by the Content Alignment properties. The change in r566412
introduce intermediate steps in the track sizing algorithm so that
inline-axis Content Distribution accounts for the row tracks sizes
computed in the next step.

However, we were adding the Content Distribution offsets for any column
track, but we should do it only for the tracks with spanning items. This
error led to the mentioned bugs and this change fixes them.

Bug: 871230, 871242
Change-Id: I8ac789ccacc2e5a51bfafd7820ed08e96a31e58b
Reviewed-on: https://chromium-review.googlesource.com/1176803
Reviewed-by: Sergio Villar <[email protected]>
Commit-Queue: Javier Fernandez <[email protected]>
Cr-Commit-Position: refs/heads/master@{#583802}

--

wpt-commits: 676265b89417b09c27d94a2a8538a88a34821e88
wpt-pr: 12512
2018-08-21 21:05:40 +00:00
Javier Fernandez 04dd479804 Bug 1463665 [wpt PR 11115] - [css-grid] Content Alignment as part of the track sizing algorithm, a=testonly
Automatic update from web-platform-tests[css-grid] Content Alignment as part of the track sizing algorithm

The CSS WG resolved [1] that Content Alignment should account to the
track sizing algorithm.

The sizing algorithm has been modified so that two new steps (1.5
and 2.5) were added to compute the Content Alignment offsets after
resolving the columns' and rows' sizes respectively.

This change decouples the Content Alignment logic from the tracks
position, so that we can use it as part of the track sizing algorithm.

I also had to store the whole ContentAlignmentData structure in two
class attributes. We need both, position and distribution offsets, to
be used in different parts of the layout logic.

Finally, since the ContentAlignmentData is now used as persistent
memory, we had to remove the STACK_ALLOCATED flag; hence, I think
using DISALLOW_COPY_AND_ASSIGN and let the functions update the
structure's internal field is a more efficient approach to commit
this change.

[1] https://github.com/w3c/csswg-drafts/issues/2557

Added WPT
  * grid-content-distribution-must-account-for-track-sizing-001.html
  * grid-content-distribution-must-account-for-track-sizing-002.html

Bug: 844744
Change-Id: I90019a96b148d3713467e35fde9482d0d39b1ced
Reviewed-on: https://chromium-review.googlesource.com/1067918
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: Manuel Rego Casasnovas <[email protected]>
Cr-Commit-Position: refs/heads/master@{#566412}

--

wpt-commits: 73ed379a1437407749c730239019bd61528b060b
wpt-pr: 11115
2018-07-11 07:49:16 +01:00
Javier Fernandez 04e474ef1d Bug 1458753 [wpt PR 10810] - [css-grid] Avoid layouts during intrinsic size computation, a=testonly
Automatic update from web-platform-tests[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, 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 <[email protected]>
Reviewed-by: Manuel Rego Casasnovas <[email protected]>
Cr-Commit-Position: refs/heads/master@{#556469}

--

wpt-commits: a878a9a9a5d1f4b0160620ba5479ba2c7d2e2373
wpt-pr: 10810
2018-05-14 09:55:26 +00:00
James Graham c261109887 Bug 1433144 - Update web-platform-tests to revision 2e19bfdaee6edb2c1069c07e14037284167284a3, a=testonly
MozReview-Commit-ID: 13sFeYHTYGC
2018-01-30 17:46:09 +00:00
James Graham ce3ea2f585 Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly
MozReview-Commit-ID: 4P631tX3vv4
2017-11-21 07:39:00 +00:00