github web-platform-tests/wpt merge_pr_46843

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
8 months ago

[@container] Clear skipped style recalc for all descendants

The existing code assumed we would always resume style recalc from the
skipped container's layout, but that is not always the case.

Take the following scenario which could happen with nested containers:

  1. Style recalc is not skipped for an outer container because it is not
    marked for layout.
  2. Style recalc is skipped for an inner container because it is marked
    for layout.
  3. Layout changes the width of the outer container because the outer
    container is auto-sized, and changes size because an ancestor box
    changes its size.
  4. The @container evaluation changes for the outer container, which
    means we enter UpdateStyleAndLayoutTreeForContainer() for the outer
    container.
  5. We reach recalc for the inner container, whose subtree was skipped
    for style recalc, but we did not clear the skipping or retrieve the
    stored style recalc change.

In this CL we always check, clear, and return the StyleRecalcChange if
style recalc was skipped.

Bug: 346264227
Change-Id: I3dc997850068a6751333ed588adf2f1f0e87518f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5630638
Reviewed-by: Anders Hartvoll Ruud andruud@chromium.org
Commit-Queue: Rune Lillesveen futhark@chromium.org
Cr-Commit-Position: refs/heads/main@{#1317345}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.