Bug 1731294 [wpt PR 30801] - Don't look for a sibling of a resumed node if we've...
commit1def1fb12b638bff8d4853da10e191343786d834
authorMorten Stenshorne <mstensho@chromium.org>
Sat, 2 Oct 2021 10:54:41 +0000 (2 10:54 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sat, 2 Oct 2021 22:25:25 +0000 (2 22:25 +0000)
tree204542ffe14fc16c8dd9ee6b777a7c9b58d1ea93
parent26b0a711ce0bcaeb61031b6a5bb4ca7a9a9786cd
Bug 1731294 [wpt PR 30801] - Don't look for a sibling of a resumed node if we've seen all children., a=testonly

Automatic update from web-platform-tests
Don't look for a sibling of a resumed node if we've seen all children.

NGBlockChildIterator would call NGBlockNode::NextSibling() in an inline
formatting context when we were at the last child break token for a
float. Floats become regular block children when resumed, so we cannot
really call NextSibling() on them at all. And we don't have to, since
there'll either be a break token to tell us where to resume in the
inline formatting context, if there is anything at all to resume.
Otherwise HasSeenAllChildren() will return true, and we can stop.

Fix and clean up NGBlockChildIterator, to hopefully make it easier to
follow.

Bug: 1249828
Change-Id: I91d03a2bfd0394a594d99ba512a992f29b4848ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3162059
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#921777}

--

wpt-commits: f22b1b29052ef3aaef2d50ddc8bb1b436d9c822f
wpt-pr: 30801
testing/web-platform/tests/css/css-break/resumed-float-and-inline-block-crash.html [new file with mode: 0644]