Automatic update from web-platform-tests
Load Ahem as a webfont everywhere (part 2) (#17173)
This change updates a large number of reftests to link to the
`/fonts/ahem.css` stylesheet. Each file contains a single additional
line before the first `<style>` element:
```
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
```
--
wp5At-commits: 9c780585758acf5e9ac6d17ad9bd03c83404c7e6
wpt-pr: 17173
Automatic update from web-platform-tests
[css-grid] Always consider baseline shim for the minimum contribution
Before this patch, the shim used for baseline alignment is not taken
into consideration when calculating the minimum contribution of a grid
item if its preferred size is auto, its minimum size is auto, and the
max track sizing function is a fixed small value. In this case, the
auto minimum size can produce a smaller track than if it was 0.
The specification needs to clarify how baseline shims interact with
minimum contributions (https://github.com/w3c/csswg-drafts/issues/3660),
but the above doesn't make sense.
BUG=934535
TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html
Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512
Commit-Queue: Oriol Brufau <[email protected]>
Reviewed-by: Manuel Rego <[email protected]>
Reviewed-by: Javier Fernandez <[email protected]>
Cr-Commit-Position: refs/heads/master@{#637299}
--
wpt-commits: c00bf09575cac952e206c2a7025ee7c84971180f
wpt-pr: 15511
Automatic update from web-platform-tests
[css-grid] Handle indefinite percentages in fit-content()
If the size of the grid container depends on the size of its tracks,
a percentage in fit-content() is indefinite. Without this patch, some
places treated this case as fit-content(0), which prevented the grid
container from growing enough to contain the max-content contribution
of its grid items.
This patch treats such fit-content() as minmax(auto, max-content),
but once the size of the grid container is known and it is laid out
"for real", then the percentage is definite and it's used.
The spec is not clear about what exactly should happen, but
minmax(auto, max-content) is consistent with percentage track sizes
and with the description of fit-content().
The change aligns Blink with Firefox and Edge.
Spec: https://drafts.csswg.org/css-grid/#track-sizes
BUG=927865
TEST=external/wpt/css/css-grid/layout-algorithm/grid-fit-content-percentage.html
Change-Id: If39c39a9a97a14f6cdee4545b560eb897053c342
Reviewed-on: https://chromium-review.googlesource.com/c/1450123
Reviewed-by: Javier Fernandez <[email protected]>
Reviewed-by: Manuel Rego <[email protected]>
Commit-Queue: Oriol Brufau <[email protected]>
Cr-Commit-Position: refs/heads/master@{#628736}
--
wpt-commits: 51a8f532d934d03b34d832339e0d1dff7a4d4545
wpt-pr: 15212
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
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
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