Skip to content
Browse files
Incorrect layout on iframe with object-fit

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:
git-svn-id: 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();
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.