Closed Bug 2074058 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62826 - css: Invalidate gradients using viewport units on viewport resize

Categories

(Core :: Layout: Images, Video, and HTML Frames, task, P4)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Himesha Baddage <himesha.baddage@codimite.com> wrote:

css: Invalidate gradients using viewport units on viewport resize

Gradient color stops and positions are resolved when the gradient is
painted rather than during style resolution, and CSSGradientValue::
GetImage discards the length conversion flags produced by that
resolution. An element whose gradient used a viewport-relative length
therefore recorded no viewport dependency on its computed style, so
resizing the viewport never marked it for style recalc. Even a forced
recalc produced an equal StyleGeneratedImage, so the computed style
was reused and the previously rasterized gradient stayed on screen
until the page was reloaded.

Record the viewport unit dependency when the generated image is
created, and snapshot the viewport size on StyleGeneratedImage so that
the image compares unequal once the viewport changes. The resulting
style difference drives both the paint invalidation and the eviction
of the cached gradient bitmap.

This mirrors the existing handling of container-relative units, and
keeps the generated image cache effective for gradients that do not
depend on the viewport. Radial and conic gradient positions and sizes
are covered as well, since they resolve viewport units too.

Bug: 557316486
Change-Id: I8bdbc56c9f5a340a370192b979362a7df5031cf4
Fixed: 557316486
Reviewed-on: https://chromium-review.googlesource.com/8383617
WPT-Export-Revision: 53abf4bd9eb2890e1c737f95b90bb0bdadfc0ee9

Component: web-platform-tests → Layout: Images, Video, and HTML Frames
Product: Testing → Core

CI Results

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

Total 509 tests

Status Summary

Firefox

OK : 42
PASS: 1[GitHub] 6[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 3512[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 3922[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 89[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 138[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

PASS: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/24a21c1bb363 https://hg.mozilla.org/integration/autoland/rev/3a12c76f4d47 [wpt PR 62826] - css: Invalidate gradients using viewport units on viewport resize, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.