Skip to content

Commit

Permalink
[IFC][Ruby] Don't let display:ruby-text through to IFC if the parent …
Browse files Browse the repository at this point in the history
…box is not display:ruby

https://bugs.webkit.org/show_bug.cgi?id=265657
rdar://119028775

Reviewed by Alan Baradlay.

fast/ruby/ruby-text-before-child-split.html
fast/ruby/ruby-overhang-crash.html

* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::adjustStyleIfNeeded):

Continuations may cause annotations to get through into surpring places but IFC doesn't deal with it.

Canonical link: https://commits.webkit.org/271386@main
  • Loading branch information
anttijk committed Dec 1, 2023
1 parent b2ed5ae commit 6052e4d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ void BoxTree::adjustStyleIfNeeded(const RenderElement& renderer, RenderStyle& st
styleToAdjust.resetBorderRight();
styleToAdjust.setPaddingRight(RenderStyle::initialPadding());
}
if ((styleToAdjust.display() == DisplayType::RubyBase || styleToAdjust.display() == DisplayType::RubyAnnotation) && renderInline.parent()->style().display() != DisplayType::Ruby)
styleToAdjust.setDisplay(DisplayType::Inline);
return;
}
if (renderer.isRenderLineBreak()) {
Expand Down

0 comments on commit 6052e4d

Please sign in to comment.