Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 64e677b027a4775149d55e010cd991024ea4a979
https://github.com/WebKit/WebKit/commit/64e677b027a4775149d55e010cd991024ea4a979
Author: Alan Baradlay <[email protected]>
Date: 2026-08-28 (Fri, 28 Aug 2026)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/resources/resource-files.json
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-computed-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-computed.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-invalid-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-invalid.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-valid-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-valid.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-026-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-027-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-028-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-029-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-percentage-slice-multiline-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-percentage-slice-ref.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-009.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-014.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-026-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-026.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-027-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-027.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-028-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-028.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-029-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-029.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-030-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-030.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-clone-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-clone.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-equivalence-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-equivalence.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-grow-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-grow.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-incremental-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-incremental.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-layer-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-layer.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-multiline-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-multiline.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-propagated-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-propagated.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-repaint-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-repaint.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-padding-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-padding.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice-multiline-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice-multiline.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/w3c-import.log
M Source/WebCore/css/CSSProperties.json
M
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
M
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.h
M Source/WebCore/rendering/TextBoxPainter.cpp
M Source/WebCore/style/InlineTextBoxStyle.cpp
M Source/WebCore/style/StyleDifference.cpp
M Source/WebCore/style/values/text-decoration/StyleTextDecorationInset.cpp
M Source/WebCore/style/values/text-decoration/StyleTextDecorationInset.h
Log Message:
-----------
[css-text-decor-4] Support percentages in text-decoration-inset
https://bugs.webkit.org/show_bug.cgi?id=322441
<rdar://problem/185850399>
Reviewed by Antti Koivisto.
Widen text-decoration-inset from <length>{1,2} to <length-percentage>{1,2}, per
the CSSWG resolution on csswg-drafts#8403.
A percentage resolves against the inline size of the decorating box for
box-decoration-break: slice, or of the individual box fragment for clone.
Since a sliced box's inline size spans all of its fragments, TextBoxPainter now
sums them (DecoratingBoxFragmentInlineSizes) instead of measuring the fragment
being painted.
That sum also gives the inline size preceding/following this fragment, so a
trimming inset larger than one fragment now carries over
into the next - a middle fragment can be trimmed, or vanish, without holding
either endpoint of the box.
Ink overflow cannot resolve these percentages while building a line, because
the basis is not known until every fragment exists.
InlineContentBuilder therefore collects the decorating boxes whose inset may
resolve negative while it walks the display boxes, and
adds the outward overhang in a follow-up pass over the finished lines.
StyleDifference compares insets with no basis, where two different percentages
would look equal, so a change involving one now requires layout outright.
Tests:
imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-026-ref.html
imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-027-ref.html
imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-028-ref.html
imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-029-ref.html
imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-percentage-slice-multiline-ref.html
imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-percentage-slice-ref.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-026.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-027.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-028.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-029.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-030.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-clone.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-equivalence.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-grow.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-incremental.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-layer.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-multiline.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-propagated.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-repaint.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-padding.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice-multiline.html
imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice.html
* LayoutTests/TestExpectations: text-decoration-inset-029 sets unprefixed
box-decoration-break, which WebKit does not support, so it slices rather than
clones;
it passes once prefixed. 009/014 carry fuzzy annotations for their fractional
endpoints
instead of expectations.
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/w3c-import.log:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-computed.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-computed-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-invalid.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-invalid-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-valid.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-inset-valid-expected.txt:
Re-import the upstream
parsing tests, which now cover percentages and calc().
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-009.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-014.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-026.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-026-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-027.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-027-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-028.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-028-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-029.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-029-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-030.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-030-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice-multiline.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-slice-multiline-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-026-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-027-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-028-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-029-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-percentage-slice-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/reference/text-decoration-inset-percentage-slice-multiline-ref.html:
Added. Import the
upstream percentage tests.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-equivalence.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-equivalence-expected.html:
Added. 25% of a 200px
box paints as 50px.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-padding.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-padding-expected.html:
Added. The basis includes
the decorating box's padding and every run inside it, not just the painted run.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-clone.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-clone-expected.html:
Added. Per-fragment basis,
via -webkit-box-decoration-break.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-layer.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-layer-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-multiline.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-multiline-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-propagated.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-propagated-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-repaint.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-repaint-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-grow.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-grow-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-incremental.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-inset-percentage-negative-incremental-expected.html:
Added. The
outward overhang of a negative percentage, across compositing, line wrapping,
propagation to a descendant, and dynamic/incremental relayout.
* Source/WebCore/css/CSSProperties.json: <length-percentage>{1,2}.
*
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::adjustDisplayLines const):
(WebCore::LayoutIntegration::InlineContentBuilder::adjustInkOverflowForPercentageTextDecorationInsets
const):
*
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.h:
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::decoratingBoxFragmentInlineSizes):
(WebCore::TextBoxPainter::insetAdjustedDecorationLocationAndWidth const):
(WebCore::DecoratingBoxFragmentInlineSizes::total const):
* Source/WebCore/style/InlineTextBoxStyle.cpp:
(WebCore::computedInkOverflowForDecorations):
* Source/WebCore/style/StyleDifference.cpp:
* Source/WebCore/style/values/text-decoration/StyleTextDecorationInset.cpp:
(WebCore::Style::TextDecorationInset::hasPercentage const):
(WebCore::Style::TextDecorationInset::hasNegativePercentage const):
(WebCore::Style::TextDecorationInset::resolvedStart const):
(WebCore::Style::TextDecorationInset::resolvedEnd const):
(WebCore::Style::TextDecorationInset::outwardExtent const):
(WebCore::Style::CSSValueConversion<TextDecorationInsetPair>::operator):
* Source/WebCore/style/values/text-decoration/StyleTextDecorationInset.h:
(WTF::MarkableTraits<WebCore::Style::TextDecorationInsetPair>::isEmptyValue):
(WTF::MarkableTraits<WebCore::Style::TextDecorationInsetPair>::emptyValue):
(WebCore::Style::TextDecorationInset::TextDecorationInset):
Canonical link: https://commits.webkit.org/320052@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications