Skip to content

Commit

Permalink
[IFC][Ruby] Don't inherit text decorations through annotation box
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=265523
rdar://118934032

Reviewed by Alan Baradlay.

"Text decoration does not propagate from the base text to the annotations."

https://www.w3.org/TR/css-ruby-1/#ruby-text-decoration

Tested by fast/ruby/text-decoration-in-descendants-ruby.html with style-based ruby enabled.

* Source/WebCore/rendering/TextDecorationPainter.cpp:
(WebCore::collectStylesForRenderer):

Canonical link: https://commits.webkit.org/271288@main
  • Loading branch information
anttijk committed Nov 29, 2023
1 parent 4e5d892 commit 9da902c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/TextDecorationPainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ static void collectStylesForRenderer(TextDecorationPainter::Styles& result, cons
const auto& style = styleForRenderer(*current);
extractDecorations(style, style.textDecorationLine());

if (current->isRenderRubyText())
if (current->isRenderRubyText() || current->style().display() == DisplayType::RubyAnnotation)
return;

current = current->parent();
Expand Down

0 comments on commit 9da902c

Please sign in to comment.