Bug 259243 - ASSERTION FAILED: formattingContextRoot.hasChild() when flex item contains certain inline child
Summary: ASSERTION FAILED: formattingContextRoot.hasChild() when flex item contains ce...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-07-15 08:25 PDT by Ethan Wong
Modified: 2023-07-22 08:26 PDT (History)
4 users (show)

See Also:


Attachments
A case to reproduce this assertion (375 bytes, text/html)
2023-07-15 08:25 PDT, Ethan Wong
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ethan Wong 2023-07-15 08:25:42 PDT
Created attachment 467050 [details]
A case to reproduce this assertion

When both IFC and FFC enabled, `ASSERT(formattingContextRoot.hasChild())` at `FormattingContext::FormattingContext(const ElementBox&, FormattingState&)` triggers when the flex item contains certain inline child.

One of my pages triggers this assertion while debugging, which could be simplified into the attached reproducible case.

I believe this issue is different from [the previous bug](https://bugs.webkit.org/show_bug.cgi?id=257802).

For the attached case, `LayoutIntegration::LineLayout` was first created from `RenderBlockFlow::tryComputePreferredWidthsUsingModernPath`. Then comes to laying out the flexbox, which creates `LayoutIntegration::FlexLayout` and replaces the inline renderer's layout box while building the new tree. When it comes to `RenderBlockFlow::layoutModernLines`, the wrong box was used.
Comment 1 zalan 2023-07-15 12:11:13 PDT
Thanks! At this point FFC is highly experimental (and I don't believe there's a WebKit based browser with such shipping configuration) so assertions like this are expected.
Comment 2 Radar WebKit Bug Importer 2023-07-22 08:26:17 PDT
<rdar://problem/112709809>