Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 163b6003b4a216bb55f81fa74a319390caffe442
https://github.com/WebKit/WebKit/commit/163b6003b4a216bb55f81fa74a319390caffe442
Author: Alan Baradlay <[email protected]>
Date: 2026-07-07 (Tue, 07 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/RenderFlexibleBox.cpp
Log Message:
-----------
[cleanup] Pass the alignment subject's writing mode into baseline alignment
instead of reading it from the renderer
https://bugs.webkit.org/show_bug.cgi?id=318356
Reviewed by Antti Koivisto.
The shared baseline alignment code only needs the alignment subject's
writing mode, but it fetched it through the renderer as
alignmentSubject.writingMode(). Have the flex and grid callers pass the
writing mode in instead, so BaselineAlignmentState no longer reaches
into a RenderBox to determine the used writing mode.
sharedGroup() and findCompatibleSharedGroup() only needed the writing
mode and no longer take the renderer at all. updateSharedGroup() and the
constructor still receive it because BaselineGroup::update() records the
RenderBox as the alignment subject's identity. No change in behavior.
* Source/WebCore/rendering/BaselineAlignment.h:
* Source/WebCore/rendering/BaselineAlignment.cpp:
(WebCore::BaselineAlignmentState::BaselineAlignmentState):
(WebCore::BaselineAlignmentState::sharedGroup const):
(WebCore::BaselineAlignmentState::updateSharedGroup):
(WebCore::BaselineAlignmentState::findCompatibleSharedGroup):
* Source/WebCore/rendering/GridBaselineAlignment.cpp:
(WebCore::GridBaselineAlignment::baselineGroupForGridItem const):
(WebCore::GridBaselineAlignment::updateBaselineAlignmentContext):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutAndPlaceFlexItems):
Canonical link: https://commits.webkit.org/316649@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications