Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7c183619077db6058ebca4a663cce3c21dc650d0
https://github.com/WebKit/WebKit/commit/7c183619077db6058ebca4a663cce3c21dc650d0
Author: Alan Baradlay <[email protected]>
Date: 2026-07-08 (Wed, 08 Jul 2026)
Changed paths:
M Source/WebCore/rendering/BaselineAlignment.cpp
M Source/WebCore/rendering/BaselineAlignment.h
M Source/WebCore/rendering/GridBaselineAlignment.cpp
M Source/WebCore/rendering/GridBaselineAlignment.h
M Source/WebCore/rendering/RenderFlexibleBox.cpp
Log Message:
-----------
[cleanup] Reduce BaselineGroup to its block-flow direction and baseline
preference
https://bugs.webkit.org/show_bug.cgi?id=318392
Reviewed by Antti Koivisto.
A baseline-sharing group is defined by its block-flow direction and baseline
preference. BaselineGroup, though, also carried two values derived from the
group's members -- the max ascent and the member count (a weak set of
renderers) -- which are products of an alignment pass, not part of the group's
identity.
With flex now tracking its own membership and max ascent, move the remaining
consumer off them: RenderGrid keeps the max ascent per group in its own
alignment context, and the computeSize() > 1 guard is dropped (a lone
participant's max ascent is its own ascent, so the offset is already zero).
BaselineGroup is left with just its defining attributes, and
BaselineAlignmentState no longer references a renderer or any layout value.
No change in behavior.
* Source/WebCore/rendering/BaselineAlignment.h:
* Source/WebCore/rendering/BaselineAlignment.cpp:
(WebCore::BaselineGroup::BaselineGroup):
(WebCore::BaselineGroup::isCompatible const):
(WebCore::BaselineAlignmentState::BaselineAlignmentState):
(WebCore::BaselineAlignmentState::sharedGroupIndex const):
* Source/WebCore/rendering/GridBaselineAlignment.h:
* Source/WebCore/rendering/GridBaselineAlignment.cpp:
(WebCore::GridBaselineAlignment::updateBaselineAlignmentContext):
(WebCore::GridBaselineAlignment::baselineOffsetForGridItem const):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutAndPlaceFlexItems):
Canonical link: https://commits.webkit.org/316706@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications