Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b213acf45065e49bfa8333018be275a105eb12ec
https://github.com/WebKit/WebKit/commit/b213acf45065e49bfa8333018be275a105eb12ec
Author: Alan Baradlay <[email protected]>
Date: 2026-05-22 (Fri, 22 May 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[cleanup] Refactor RenderFlexibleBox::maybeCacheFlexItemMainIntrinsicSize to
return the intrinsic main size
https://bugs.webkit.org/show_bug.cgi?id=315284
Reviewed by Antti Koivisto.
maybeCacheFlexItemMainIntrinsicSize was a void function whose name suggested
caching, but its real job was computing the flex item's intrinsic main-axis
size. The caller stashed the value in m_intrinsicSizeAlongMainAxis and later
read it back with .get() in branch 9.2.3 E of computeFlexBaseSizeForFlexItem -
a return value threaded through member state.
Renamed to flexItemIntrinsicMainSize and changed to return
std::optional<LayoutUnit>.
The caller now uses the value directly. cacheFlexItemMainSize was inlined: it
had a single caller and its asserts were redundant after the fold.
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeFlexBaseSizeForFlexItem):
(WebCore::RenderFlexibleBox::flexItemIntrinsicMainSize):
(WebCore::RenderFlexibleBox::cacheFlexItemMainSize): Deleted.
* Source/WebCore/rendering/RenderFlexibleBox.h:
Canonical link: https://commits.webkit.org/313724@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications