Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 37f7ddb084c70fb05cb05bb0db58ee12c192843e
https://github.com/WebKit/WebKit/commit/37f7ddb084c70fb05cb05bb0db58ee12c192843e
Author: Alan Baradlay <[email protected]>
Date: 2026-08-10 (Mon, 10 Aug 2026)
Changed paths:
A
LayoutTests/fast/text-autosizing/ios/block-level-box-on-a-line-expected.html
A LayoutTests/fast/text-autosizing/ios/block-level-box-on-a-line.html
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
[block-in-inline] Text autosizing treats a block level box on a line as a
line of text
https://bugs.webkit.org/show_bug.cgi?id=321349
Reviewed by Antti Koivisto.
adjustComputedFontSizes classifies each autosizing cluster as NO_LINE, ONE_LINE
or MULTI_LINE and
picks oneLineTextMultiplier or textMultiplier accordingly. It counts the
cluster's lines with
RenderBlockFlow::lineCount(), which counts every line, including one whose only
in-flow content is
a block level box. Such a box is not a line of text: it is autosized as its own
cluster, or holds
clusters of its own. A container with a single line of text next to a block
level box on a line
therefore lands in the multi line bucket and picks up the larger multiplier.
Count only the lines that are not carrying a block level box. lineCount()
itself is left alone,
since line clamp and the deprecated flexible box also call it and want judging
separately.
* LayoutTests/fast/text-autosizing/ios/block-level-box-on-a-line.html: Added.
* LayoutTests/fast/text-autosizing/ios/block-level-box-on-a-line-expected.html:
Added.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::lineCountIgnoringBlockLevelBoxes
const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustComputedFontSizes):
Canonical link: https://commits.webkit.org/318884@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications