Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3462fdfdf9b90988844d74cb50174b89cd093c11
https://github.com/WebKit/WebKit/commit/3462fdfdf9b90988844d74cb50174b89cd093c11
Author: Ahmad Saleem <[email protected]>
Date: 2026-04-07 (Tue, 07 Apr 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
Log Message:
-----------
text-indent: calc() with percentages should treat percentages as 0 for
intrinsic size contributions
https://bugs.webkit.org/show_bug.cgi?id=242467
rdar://97025949
Reviewed by Alan Baradlay.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
Per [1], "Percentages must be treated as 0 for the purpose of
calculating intrinsic size contributions, but are always resolved
normally when performing layout."
The check only handled pure percentage values via isPercent(), missing
calc() expressions containing percentages like calc(50% - 3px). Widen
the check to isPercentOrCalculated() and evaluate with a zero
percentage basis so percentage components are treated as 0 while
fixed-length parts are preserved.
[1] https://drafts.csswg.org/css-text/#text-indent-property
* LayoutTests/TestExpectations: Progression
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::computedTextIndent const):
Canonical link: https://commits.webkit.org/310759@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications