Skip to content

Commit

Permalink
[IFC][Ruby] Fix imported/w3c/web-platform-tests/css/css-contain/conta…
Browse files Browse the repository at this point in the history
…in-layout-005.html

https://bugs.webkit.org/show_bug.cgi?id=266475

Reviewed by Antti Koivisto.

Layout containment does not apply to ruby-text (annotations).

* LayoutTests/fast/text/emphasis-avoid-ruby.html:
* Source/WebCore/rendering/RenderElementInlines.h:
(WebCore::RenderElement::shouldApplyLayoutOrPaintContainment const):

Canonical link: https://commits.webkit.org/272113@main
  • Loading branch information
alanbaradlay committed Dec 15, 2023
1 parent fcaa0de commit 9fdb1cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderElementInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ inline bool RenderElement::shouldApplyLayoutContainment() const

inline bool RenderElement::shouldApplyLayoutOrPaintContainment(bool containsAccordingToStyle) const
{
return containsAccordingToStyle && (!isInline() || isAtomicInlineLevelBox()) && !isRenderRubyText() && (!isTablePart() || isRenderBlockFlow());
return containsAccordingToStyle && (!isInline() || isAtomicInlineLevelBox()) && !(isRenderRubyText() || style().display() == DisplayType::RubyAnnotation) && (!isTablePart() || isRenderBlockFlow());
}

inline bool RenderElement::shouldApplyLayoutOrPaintContainment() const
Expand Down

0 comments on commit 9fdb1cb

Please sign in to comment.