Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b0fca83e73e32c3b407193eb9302fe80fe1a2540
      
https://github.com/WebKit/WebKit/commit/b0fca83e73e32c3b407193eb9302fe80fe1a2540
  Author: Alan Baradlay <[email protected]>
  Date:   2026-03-16 (Mon, 16 Mar 2026)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.cpp
    M Source/WebCore/rendering/TextBoxPainter.cpp
    M Source/WebCore/rendering/TextBoxPainter.h
    M Source/WebCore/rendering/TextDecorationPainter.cpp
    M Source/WebCore/rendering/TextDecorationPainter.h

  Log Message:
  -----------
  [cleanup] TextDecorationPainter's BackgroundDecorationGeometry should include 
the width for decoration
https://bugs.webkit.org/show_bug.cgi?id=309982

Reviewed by Antti Koivisto.

This is in preparation for fixing decoration painting for ruby base content.

In most cases, the text box width matches the decoration width (e.g. underline 
width)
due to the hugging behavior of inline boxes.
Ruby base text is an exception: the text may be aligned (e.g. centered) by 
offsetting
the base content inside the ruby base inline box. In such cases the text box 
ends up being
shorter than the expected decoration width.

trunk rendering:

    annotation text
         base
         ----

expected rendering:

    annotation text
         base
    ---------------

* Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.cpp:
(WebCore::Layout::expandInlineBoxWithDescendants):
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::collectDecoratingBoxesForBackgroundPainting):
(WebCore::TextBoxPainter::paintBackgroundDecorations):
* Source/WebCore/rendering/TextBoxPainter.h:
* Source/WebCore/rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintBackgroundDecorations):
* Source/WebCore/rendering/TextDecorationPainter.h:

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



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

Reply via email to