[webkit-changes] [WebKit/WebKit] ec9124: [Painting] Compute underline offset for text-under...

Alan Baradlay noreply at github.com
Sun Feb 4 06:27:50 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ec9124dacd6811b7c551ad9ddedee10c7dd7c61f
      https://github.com/WebKit/WebKit/commit/ec9124dacd6811b7c551ad9ddedee10c7dd7c61f
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-02-04 (Sun, 04 Feb 2024)

  Changed paths:
    A LayoutTests/fast/inline/text-underline-position-right-simple-expected.html
    A LayoutTests/fast/inline/text-underline-position-right-simple.html
    M Source/WebCore/rendering/TextDecorationPainter.cpp
    M Source/WebCore/rendering/style/RenderStyle.cpp
    M Source/WebCore/style/InlineTextBoxStyle.cpp

  Log Message:
  -----------
  [Painting] Compute underline offset for text-underline-position left/right
https://bugs.webkit.org/show_bug.cgi?id=268693

Reviewed by Antti Koivisto.

This change adds painting support for text-underline-position right (left).

1. position 'right' always paints to the opposite side of under (do not confuse under/over sides with block direction i.e. vertical-lr vs. vertical-rl)
2. underline offset inflates underline rect to the opposite direction when the value is 'right'.

* Source/WebCore/rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintBackgroundDecorations):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeAffectsVisualOverflow const):
* Source/WebCore/style/InlineTextBoxStyle.cpp:
(WebCore::computedUnderlineOffset):
(WebCore::computedVisualOverflowForDecorations):

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




More information about the webkit-changes mailing list