Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1731319 [wpt PR 30800] - Pre-paint: Avoid inlines that aren't pre…
…sent in a fragmentainer., a=testonly Automatic update from web-platform-tests Pre-paint: Avoid inlines that aren't present in a fragmentainer. If the parent block fragment isn't an inline formatting context, we generally don't need to enter inlines, except that we need to clear the paint flags. Therefore, only enter inlines if the parent is at the last fragment. Entering at any other fragment may cause us to update the paint offset, which might set paint invalidation flags for no good reason. In the test included, there's a tall float in an inline formatting context, taking up three columns. There's a line in the first column with just a BR element. There's also a wide inline-block, but it doesn't fit beside the float, so it gets pushed to the third column, where we create a line for it below the float. When a float in an inline formatting context breaks, it's resumed as a regular block. An inline formatting context will only be created if there's actual inline content there as well. So, the second column doesn't get any inline content at all (i.e. no fragment items). Therefore we'd visit the BR element in the first column (correct - this is where the element is). We'd then re-enter it in the second column (because we had no inline formatting context to search, and just enter everything - this is bad), and update the paint offset (and possibly other things), and set invalidation flags. In the third column we'll not enter it, because there we have an inline formatting context to search (and the BR will not be found). So we'd end up with paint invalidation flags not cleared. Bug: 1249769 Change-Id: Icaa583c0bb1a034a7a2690ab6bc27cbcb7010f75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3162102 Reviewed-by: Koji Ishii <[email protected]> Commit-Queue: Morten Stenshorne <[email protected]> Cr-Commit-Position: refs/heads/main@{#922120} -- wpt-commits: fa627bbd3e4b5a00cb3f91975a57ff0817abdb6a wpt-pr: 30800
- Loading branch information