Closed Bug 1769120 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 34046 - [@container] Properly invalidate container-relative units in gradients

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 34046 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/34046
Details from upstream follow.

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

[@container] Properly invalidate container-relative units in gradients

This is not straightforward, because the actual unit conversion
happens outside of style resolution. It can also (in theory) happen
on a ComputedStyle which is not currently stored on an Element, which
is not compatible with our current behavior of marking ComputedStyles
as container-query-dependent during length conversion. (The we would
set the container-query-dependent flags on a ComputedStyle never seen
by the recalc machinery).

To fix this, we add functions for figuring out whether or not a generated
image depends on container-relative units, and use this information
ElementStyleResources-time (which is during style resolution) to mark
the ComputedStyle as container-query-dependent.

Moved a SetDependsOnContainerQueries call to happen directly from
CSSToLengthConversionData instead of an after-the-fact fixup in
StyleResolver::ResolveStyle. This is to avoid any problems with
length conversions that may happen after that check.

This also fixes the issue of fetching the container sizes eagerly if
they're not really needed (Issue 1324901).

Bug: 1223030
Change-Id: I78cd8ef571c0563b0d308d3801446ece7a0b1693
Fixed: 1313084, 1324901
Reviewed-on: https://chromium-review.googlesource.com/3644432
WPT-Export-Revision: d4c43ade729b1896e9a1b8e348ba8ab957e29641

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

FAIL: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5cd48005e0b2
[wpt PR 34046] - [@container] Properly invalidate container-relative units in gradients, a=testonly
https://hg.mozilla.org/integration/autoland/rev/e3e6d00c3402
[wpt PR 34046] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.