Closed Bug 1551463 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 16717 - Correctly invalidate snap container data when relevant css props change

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Majid Valipour <majidvp@chromium.org> wrote:

Correctly invalidate snap container data when relevant css props change

Previously we would only recompute snap data when only the first time
the snap area or container was processed and again when a handful of css
properties [1] changed.

This means style changes that contained other relevant properties [2]
did not take affect. This problem was mostly masked because our existing
tests never updates these properties beyond the first instance.

Changes in this patch:

  • Update invalidation logic to take all relevant props into account.
  • Simplify invalidation logic by separating add/remove case from style
    changed case.
  • Minor improvement in invalidation documentation in viewport case.

[1] snap-scroll-type, snap-scroll-align [2] scroll-padding,
scroll-margin, scroll-snap-stop

TODO: This CL adds a new test specifically for scroll-snap-stop
property changing. We need additional test to check invalidation logic
for other properties.

Test: external/wpt/css/css-scroll-snap/scroll-snap-stop-change.html => ensuring changing scroll-snap-stop takes effect
Bug: 957995
Change-Id: I494bb259bb213dec44b19449d9b79b1446a67be2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1597536
Commit-Queue: Majid Valipour \<majidvp@chromium.org>
Reviewed-by: David Bokan \<bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658583}

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Failed to get results from try push
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/589dcaf95093
[wpt PR 16717] - Correctly invalidate snap container data when relevant css props change, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/ac6516ebbc4d
[wpt PR 16717] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.