Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fc6f33a5416ad3e3f003a734453f27308f927e1c
https://github.com/WebKit/WebKit/commit/fc6f33a5416ad3e3f003a734453f27308f927e1c
Author: Nipun Shukla <[email protected]>
Date: 2026-03-11 (Wed, 11 Mar 2026)
Changed paths:
A PerformanceTests/Layout/nested-column-flexboxes-branching.html
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
flexbox container leads to complete freeze of WebKit
https://bugs.webkit.org/show_bug.cgi?id=289072
rdar://146141220
Reviewed by Sammy Gill.
In maybeCacheFlexItemMainIntrinsicSize, skip calling
updateBlockChildDirtyBitsBeforeLayout when we already
have a cached intrinsic size and the child doesn't need
layout for non-percentage reasons. This prevents
updateBlockChildDirtyBitsBeforeLayout from marking items
dirty solely due to percentage heights, which previously
caused each nested flex container to redundantly
re-layout all its descendants. Also skip setting
forceFlexItemRelayout to true unless the main axis size
has changed and we have already completed a layout pass
at the same container height.
A performance test is included to verify progression in
a pathological case with deep nesting. That microbenchmark
progresses from ~1.1 runs/s across 20 iterations to
~58 runs/s with this patch.
No functionality change should occur with this patch.
* PerformanceTests/Layout/nested-column-flexboxes-branching.html: Added.
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::performFlexLayout):
(WebCore::RenderFlexibleBox::maybeCacheFlexItemMainIntrinsicSize):
(WebCore::RenderFlexibleBox::layoutAndPlaceFlexItems):
* Source/WebCore/rendering/RenderFlexibleBox.h:
Canonical link: https://commits.webkit.org/309068@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications