Bug 1746418 [wpt PR 32107] - Pre-paint: Handle missing tree builder context correctly...
commitc4fa5bd7f33be83b1bb94cf77c329e6a11f82b39
authorMorten Stenshorne <mstensho@chromium.org>
Fri, 24 Dec 2021 09:54:15 +0000 (24 09:54 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 24 Dec 2021 19:30:50 +0000 (24 19:30 +0000)
treecf0072b0c72497dfb5caf3a9ed425a2d0c25fa2a
parentc449eb7886da3dc872d35be489f50f0c30df1a01
Bug 1746418 [wpt PR 32107] - Pre-paint: Handle missing tree builder context correctly., a=testonly

Automatic update from web-platform-tests
Pre-paint: Handle missing tree builder context correctly.

The tree builder is ever only missing if DCHECKs are disabled, which
explains why this bug wasn't reproducible with DHCECKs enabled.

In this mode, we'd never increment inner_fragmentainer_idx, which would
cause us to discard all existing FragmentData entries, so that we'd have
more NGPhysicalBoxFragment objects than FragmentData objects, and
LayoutBox::FragmentDataFromPhysicalFragment() would crash.

Structure the code in such a way that we'll hopefully not make a similar
mistake again.

Bug: 1278652
Change-Id: I3ec35eb81b330f5a40f9b2469218eaecff7dc586
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3344750
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#953136}

--

wpt-commits: a9aa0506bb30c00f154a2fb8225c97bb733fc365
wpt-pr: 32107
testing/web-platform/tests/css/css-break/change-block-background.html [new file with mode: 0644]