Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: aacda4801ee1a313353cd12dd78cabbb4285f9a3
https://github.com/WebKit/WebKit/commit/aacda4801ee1a313353cd12dd78cabbb4285f9a3
Author: Alan Baradlay <[email protected]>
Date: 2026-05-27 (Wed, 27 May 2026)
Changed paths:
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBlock.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
[cleanup] Rename computeBlockPreferredLogicalWidths to
computeBlockIntrinsicLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=315631
Reviewed by Antti Koivisto.
The function walks each in-flow child, accumulates margin + child
preferred-width contributions, and returns the parent's min-content /
max-content widths. Those are intrinsic widths per css-sizing-3
(line 304-309: "A max-content size or min-content size, i.e. a size
arising primarily from the size of the content"), not "preferred"
widths in the spec sense (which are the values of the width / height
properties). The "Preferred" name dates from before the spec
vocabulary stabilized.
Renamed to computeBlockIntrinsicLogicalWidths, matching the
surrounding intrinsic-sizing family (computeIntrinsicLogicalWidths,
computeIntrinsicLogicalWidthsForFieldsetLegend,
intrinsicLogicalMarginStartAndEnd). Also switched the void +
out-param signature to a std::pair<LayoutUnit, LayoutUnit> return so
callers see an honest "compute and return" function rather than
having to wonder whether the callee accumulates into the in-values
or replaces them. Both callers passed in the default 0 / 0, so the
behavior is unchanged; they now bind the pair via std::tie.
No behavior change.
* Source/WebCore/rendering/RenderBlock.h:
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeIntrinsicLogicalWidths):
(WebCore::RenderBlock::computeBlockIntrinsicLogicalWidths):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
Canonical link: https://commits.webkit.org/313997@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications