diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 331961a32aaf..b4796c80ede4 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -4853,7 +4853,13 @@ nsDisplayBorder::CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder, if (mBorderImageRenderer) { CreateBorderImageWebRenderCommands(aBuilder, aParentCommands, aLayer); } else if (mBorderRenderer) { - mBorderRenderer->CreateWebRenderCommands(aBuilder, aLayer); + gfx::Rect clip(0, 0, 0, 0); + if (GetClip().HasClip()) { + int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel(); + clip = NSRectToRect(GetClip().GetClipRect(), appUnitsPerDevPixel); + } + + mBorderRenderer->CreateWebRenderCommands(aBuilder, aLayer, clip); } }