From 9ff5cf0b0c2dac4fba3d1c39894ba784307f67c9 Mon Sep 17 00:00:00 2001 From: Razvan Maries Date: Fri, 15 May 2020 17:17:55 +0300 Subject: [PATCH] Backed out changeset c66945aba519 (bug 1638020) for perma failures on RetainedDisplayListBuilder.cpp. CLOSED TREE --- layout/painting/RetainedDisplayListBuilder.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/layout/painting/RetainedDisplayListBuilder.cpp b/layout/painting/RetainedDisplayListBuilder.cpp index 1ff9b32e1c35..860777d079e2 100644 --- a/layout/painting/RetainedDisplayListBuilder.cpp +++ b/layout/painting/RetainedDisplayListBuilder.cpp @@ -1027,17 +1027,16 @@ static bool ProcessFrameInternal(nsIFrame* aFrame, MOZ_ASSERT(currentFrame); - nsIContent* content = currentFrame->GetContent(); - nsRect displayPort; - const bool hasDisplayPort = - content && nsLayoutUtils::GetDisplayPort(content, &displayPort); - - if (hasDisplayPort) { + if (nsLayoutUtils::FrameHasDisplayPort(currentFrame)) { CRR_LOG("Frame belongs to displayport frame %p\n", currentFrame); nsIScrollableFrame* sf = do_QueryFrame(currentFrame); MOZ_ASSERT(sf); - - // Get overflow relative to the scrollport (from the scrollframe) + nsRect displayPort; + DebugOnly hasDisplayPort = nsLayoutUtils::GetDisplayPort( + currentFrame->GetContent(), &displayPort, + DisplayportRelativeTo::ScrollPort); + MOZ_ASSERT(hasDisplayPort); + // get it relative to the scrollport (from the scrollframe) nsRect r = aOverflow - sf->GetScrollPortRect().TopLeft(); r.IntersectRect(r, displayPort); if (!r.IsEmpty()) {