Bug 264303

Summary: [css-flex] Flex layout incorrectly dirties preferred width bits towards the end of layout
Product: WebKit Reporter: Sammy Gill <sgill26>
Component: Layout and RenderingAssignee: Sammy Gill <sgill26>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, qmmille, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/43652
https://bugs.webkit.org/show_bug.cgi?id=266601

Description Sammy Gill 2023-11-06 15:57:35 PST
RenderFlexibleBox::layoutAndPlaceChildren will sometimes incorrectly dirty the preferred widths bit of flex items with a call to updateBlockChildDirtyBitsBeforeLayout. This is incorrect since this is down towards the end of layout and we never compute the preferred widths for flex items after this point. This dirtying should happen if the content of the flex item changes, since that is what the intrinsic sizes is based off of, or if there is some other related style change on the flexbox that could impact it (e.g. items with an aspect-ratio for the content based minimum size: https://drafts.csswg.org/css-flexbox-1/#content-based-minimum-size)
Comment 1 Sammy Gill 2023-11-06 15:58:44 PST
rdar://117181858
Comment 2 Sammy Gill 2023-11-06 17:10:34 PST
Pull request: https://github.com/WebKit/WebKit/pull/19807
Comment 3 EWS 2023-12-13 11:26:37 PST
Committed 271995@main (efb0cb853cc0): <https://commits.webkit.org/271995@main>

Reviewed commits have been landed. Closing PR #19807 and removing active labels.
Comment 4 Sammy Gill 2023-12-13 12:32:52 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/43652
Comment 5 Sammy Gill 2023-12-20 09:23:35 PST
*** Bug 266601 has been marked as a duplicate of this bug. ***
Comment 6 Sammy Gill 2023-12-20 10:33:58 PST
For future context: The effects of this bug was first reported on https://www.amazon.com/stores/Jellycat/page/92DE52A7-85AC-40F4-A3A5-08B62869740E?ref_=ast_bln