Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a34b920289c007ffe6fb74e7aeb424c811755480
https://github.com/WebKit/WebKit/commit/a34b920289c007ffe6fb74e7aeb424c811755480
Author: Ahmad Saleem <[email protected]>
Date: 2026-04-22 (Wed, 22 Apr 2026)
Changed paths:
A
LayoutTests/fast/flexbox/deprecated-flex-box-writing-mode-shrink-expected.txt
A LayoutTests/fast/flexbox/deprecated-flex-box-writing-mode-shrink.html
M
LayoutTests/imported/w3c/web-platform-tests/compat/webkit-box-item-shrink-002-expected.txt
R
LayoutTests/platform/glib/imported/w3c/web-platform-tests/compat/webkit-box-item-shrink-002-expected.txt
R
LayoutTests/platform/ios-18/imported/w3c/web-platform-tests/compat/webkit-box-item-shrink-002-expected.txt
R
LayoutTests/platform/ios/imported/w3c/web-platform-tests/compat/webkit-box-item-shrink-002-expected.txt
M Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Log Message:
-----------
Fix deprecated -webkit-box flex distribution for children with orthogonal
writing modes
https://bugs.webkit.org/show_bug.cgi?id=312980
rdar://175323734
Reviewed by Alan Baradlay.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
layoutVerticalBox stacks children by physical height (child->height()) but
the flex shrink/grow calculations used heightForChild() which returns
child->logicalHeight(). For children with writing-mode: vertical-rl,
logicalHeight() is the physical width, causing the flex algorithm to
measure and constrain the wrong dimension entirely.
Add
mainAxisExtentForChild/mainAxisContentExtentForChild/setOverridingMainAxisExtent
helpers that select the correct logical axis based on whether the child's
writing mode aligns with the stacking direction. Apply to both the
horizontal and vertical layout paths.
Test: fast/flexbox/deprecated-flex-box-writing-mode-shrink.html
*
LayoutTests/fast/flexbox/deprecated-flex-box-writing-mode-shrink-expected.txt:
Added.
* LayoutTests/fast/flexbox/deprecated-flex-box-writing-mode-shrink.html: Added.
*
LayoutTests/imported/w3c/web-platform-tests/compat/webkit-box-item-shrink-002-expected.txt:
Progressions
* Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::mainAxisExtentForChild):
(WebCore::mainAxisContentExtentForChild):
(WebCore::setOverridingMainAxisExtent):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
> Remove Platform Specific Expectations:
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/compat/webkit-box-item-shrink-002-expected.txt:
Removed.
*
LayoutTests/platform/ios-18/imported/w3c/web-platform-tests/compat/webkit-box-item-shrink-002-expected.txt:
Removed.
*
LayoutTests/platform/ios/imported/w3c/web-platform-tests/compat/webkit-box-item-shrink-002-expected.txt:
Removed.
Canonical link: https://commits.webkit.org/311787@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications