Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 63a848ee9d8f92657616e29ab2f2b5f12a90be25
      
https://github.com/WebKit/WebKit/commit/63a848ee9d8f92657616e29ab2f2b5f12a90be25
  Author: Alan Baradlay <[email protected]>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-001-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-001-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-001.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-002-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-002-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-002.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-003-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-003-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-003.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-004-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-004-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-004.html
    M Source/WebCore/rendering/TextBoxPainter.cpp
    M Source/WebCore/rendering/TextBoxPainter.h

  Log Message:
  -----------
  Line-through is too thin over a descendant inline box
https://bugs.webkit.org/show_bug.cgi?id=316108

Reviewed by Antti Koivisto.

  <div style="text-decoration: line-through; text-decoration-thickness: 30px">
    1<span>2</span>3
  </div>

The line-through should be 30px thick across 1, 2 and 3. Instead the segment
over the <span> (2) was a thin line: its thickness came from the span, whose
text-decoration-thickness is auto, rather than from the div that set the
line-through.

When painting a line-through, paintForegroundDecorations took the thickness,
position and color from the text's direct parent inline box. For text inside an
inline box that does not itself set the decoration that parent is the wrong box,
since the decoration was established by an ancestor.

paintForegroundDecorations now collects the decorating boxes by walking the
inline box ancestors and paints the line-through using the style of the box that
established it, one per decorating box. This mirrors what the background
(underline/overline) path already does, which is why those were unaffected.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-001-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-001-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-001.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-002-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-002-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-002.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-003-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-003-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-003.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-004-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-004-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-linethrough-descendant-004.html:
 Added.
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::isDecoratingBoxForForeground):
(WebCore::TextBoxPainter::collectDecoratingBoxesForForegroundPainting):
(WebCore::TextBoxPainter::paintForegroundDecorations):
(WebCore::decoratingBoxStyle): Deleted.
* Source/WebCore/rendering/TextBoxPainter.h:

Canonical link: https://commits.webkit.org/314391@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to