[webkit-changes] [WebKit/WebKit] de59fe: [Painting] Overline and underline should alternate...
Alan Baradlay
noreply at github.com
Sun Feb 4 12:51:36 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: de59fe73dbfde4a5cb63446455f1cdd388205d3e
https://github.com/WebKit/WebKit/commit/de59fe73dbfde4a5cb63446455f1cdd388205d3e
Author: Alan Baradlay <zalan at apple.com>
Date: 2024-02-04 (Sun, 04 Feb 2024)
Changed paths:
A LayoutTests/fast/inline/text-overline-underlin-position-simple-expected.html
A LayoutTests/fast/inline/text-overline-underlin-position-simple.html
M Source/WebCore/rendering/TextBoxPainter.cpp
M Source/WebCore/style/InlineTextBoxStyle.cpp
M Source/WebCore/style/InlineTextBoxStyle.h
Log Message:
-----------
[Painting] Overline and underline should alternate painting sides
https://bugs.webkit.org/show_bug.cgi?id=268694
Reviewed by Antti Koivisto.
When underline paints to the 'over' side of the line, overline should paint to the 'under' side instead.
(In vertical typographic modes, the underline is aligned as for under, except it is always aligned to the left edge of the text. If this causes the underline to be drawn on the "over" side of the text, then an overline also switches sides and is drawn on the "under" side.
see https://drafts.csswg.org/css-text-decor/#text-underline-position-property)
* LayoutTests/fast/inline/text-overline-underlin-position-simple-expected.html: Added.
* LayoutTests/fast/inline/text-overline-underlin-position-simple.html: Added.
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter<TextBoxPath>::paintBackgroundDecorations):
* Source/WebCore/style/InlineTextBoxStyle.cpp:
(WebCore::inlineBoxContentBoxHeight):
(WebCore::underlineOffsetForTextBoxPainting):
(WebCore::overlineOffsetForTextBoxPainting):
* Source/WebCore/style/InlineTextBoxStyle.h:
Canonical link: https://commits.webkit.org/274075@main
More information about the webkit-changes
mailing list