Bug 1406715 - Use the RenderFrameParent's content rect as the bounds of the webrender iframe display item. r?kats
It was using the visible rect of the display item before, which can be larger
than the frame for various reasons. But the bounds we pass for the webrender
iframe item determines the iframe's position, so it needs to be informed by the
layout position of the frame, not by circumstances of the paint.
MozReview-Commit-ID: JSmFGLmAm0h
--- a/layout/ipc/RenderFrameParent.cpp
+++ b/layout/ipc/RenderFrameParent.cpp
@@ -385,21 +385,21 @@ bool
nsDisplayRemote::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
mozilla::wr::IpcResourceUpdateQueue& aResources,
const StackingContextHelper& aSc,
mozilla::layers::WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder)
{
mOffset = mozilla::layout::GetContentRectLayerOffset(mFrame, aDisplayListBuilder);
- mozilla::LayoutDeviceRect visible = mozilla::LayoutDeviceRect::FromAppUnits(
- GetVisibleRect(), mFrame->PresContext()->AppUnitsPerDevPixel());
- visible += mOffset;
+ mozilla::LayoutDeviceRect rect = mozilla::LayoutDeviceRect::FromAppUnits(
+ mFrame->GetContentRectRelativeToSelf(), mFrame->PresContext()->AppUnitsPerDevPixel());
+ rect += mOffset;
- aBuilder.PushIFrame(aSc.ToRelativeLayoutRect(visible),
+ aBuilder.PushIFrame(aSc.ToRelativeLayoutRect(rect),
!BackfaceIsHidden(),
mozilla::wr::AsPipelineId(GetRemoteLayersId()));
return true;
}
bool
nsDisplayRemote::UpdateScrollData(mozilla::layers::WebRenderScrollData* aData,