Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e0aaff37de87264a1670c7c916b921c375fac231
https://github.com/WebKit/WebKit/commit/e0aaff37de87264a1670c7c916b921c375fac231
Author: Alan Baradlay <[email protected]>
Date: 2026-08-05 (Wed, 05 Aug 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/orthogonal-block-in-inline-line-height-001-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/orthogonal-block-in-inline-line-height-001.html
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
[block-in-inline] Empty orthogonal block nested in an inline box stretches
the line
https://bugs.webkit.org/show_bug.cgi?id=321089
Reviewed by Antti Koivisto.
RenderBox::logicalTop() is
writingMode().isHorizontal() ? y() : x()
resolved in the *child's* writing mode. For a vertical-rl child in a
horizontal-tb container it therefore
returns the child's physical x, which in an rtl container is its right edge.
That value was returned as the
block's logical top, became borderBoxTop in
layoutWithFormattingContextForBlockInInline, was stored as the
block's vertical margin and the line inherited it as its height:
renderer x=769 y=0 -> childLogicalTop=769 -> marginBefore=769 -> line
height 769
RenderBlock::logicalTopForChild() is `isHorizontalWritingMode() ? child.y() :
child.x()`, i.e. resolved
against the container, which is what the caller means. Needs all three of rtl,
an orthogonal writing mode
and an empty block - with content in the block a different path computes the
size.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChildFromInlineLayout):
*
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/orthogonal-block-in-inline-line-height-001.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/orthogonal-block-in-inline-line-height-001-expected.txt:
Added.
Canonical link: https://commits.webkit.org/318659@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications