From ac734805c4cca6bea7e993c6d1a1b7561b59b1a8 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Thu, 1 Mar 2018 16:53:58 +1300 Subject: [PATCH] Bug 1436510 - Don't attempt partial display list building within perspective as we need to build all children to get consistent indices. r=miko --- layout/generic/nsFrame.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index dc68a903f7c1..b38fcecfca1b 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -2828,6 +2828,16 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder, } } + // nsDisplayPerspective items use an index to keep their PerFrameKey unique. + // We need to make sure we build all of them for them to be consistent, so + // rebuild all items if we have perspective. Bug 1431249 should remove + // this requirement. + if (aBuilder->IsRetainingDisplayList() && + ChildrenHavePerspective(disp)) { + dirtyRect = visibleRect; + aBuilder->MarkFrameModifiedDuringBuilding(this); + } + bool inTransform = aBuilder->IsInTransform(); bool isTransformed = IsTransformed(disp); bool hasPerspective = HasPerspective(disp);