Skip to content
Permalink
Browse files
Incorrect layout on iframe with object-fit
https://bugs.webkit.org/show_bug.cgi?id=240940
<rdar://93188925>

Reviewed by Alan Bujtas.

Don't use replacedContentRect() when positioning iframe content layers, because iframes
don't (yet) respond to object-fit.

* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::contentsBox const):

Canonical link: https://commits.webkit.org/251010@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
smfr committed May 26, 2022
1 parent 28df7dd commit 375bfed2e7f3e480a0b69a940cf5cc8738c72201
Showing 1 changed file with 2 additions and 1 deletion.
@@ -2995,7 +2995,8 @@ LayoutRect RenderLayerBacking::contentsBox() const
contentsRect = downcast<RenderVideo>(renderBox).videoBox();
else
#endif
if (is<RenderReplaced>(renderBox)) {

if (is<RenderReplaced>(renderBox) && !is<RenderWidget>(renderBox)) {
RenderReplaced& renderReplaced = downcast<RenderReplaced>(renderBox);
contentsRect = renderReplaced.replacedContentRect();
} else

0 comments on commit 375bfed

Please sign in to comment.