Bug 1729937 - Don't include the display item clip in the paint rect. r=jrmuizel

For non-WR painting from nsDisplayList::Paint, the display item clip will already be applied to the context, so will still be included in the result via the clip extents.
WebRender fallback painting intentionally doesn't use the clip (since the clip can include the displayport size), to avoid needing to invalidate for display port changes..

Differential Revision: https://phabricator.services.mozilla.com/D125613
This commit is contained in:
Matt Woodrow 2021-09-21 23:50:40 +00:00
parent 023e10a432
commit 65ab371853

View File

@ -2659,7 +2659,8 @@ nsDisplayContainer::nsDisplayContainer(
nsRect nsDisplayItem::GetPaintRect(nsDisplayListBuilder* aBuilder,
gfxContext* aCtx) {
nsRect result = GetClippedBounds(aBuilder);
bool dummy;
nsRect result = GetBounds(aBuilder, &dummy);
if (aCtx) {
result.IntersectRect(result,
nsLayoutUtils::RoundGfxRectToAppRect(