Commit ce5fd139 authored by Timothy Nikkel's avatar Timothy Nikkel
Browse files

Bug 1687928. Move call to MaybeCreateDisplayPortInFirstScrollFrameEncountered...

Bug 1687928. Move call to MaybeCreateDisplayPortInFirstScrollFrameEncountered before DecideScrollableLayer in PaintFrame. r=botond

Because DecideScrollableLayer uses the existence of a displayport in it's decision.

In practice though we only paint from process root documents and the root scroll frame will have a displayport (almost?) always. So it's a small correctness improvement that is likely to have little effect.

Differential Revision: https://phabricator.services.mozilla.com/D102588
parent b9384b09
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -3169,6 +3169,12 @@ nsresult nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext,
    }
  }

  builder->ClearHaveScrollableDisplayPort();
  if (builder->IsPaintingToWindow()) {
    DisplayPortUtils::MaybeCreateDisplayPortInFirstScrollFrameEncountered(
        aFrame, builder);
  }

  nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
  if (rootScrollFrame && !aFrame->GetParent()) {
    nsIScrollableFrame* rootScrollableFrame =
@@ -3226,12 +3232,6 @@ nsresult nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext,
    }
  }

  builder->ClearHaveScrollableDisplayPort();
  if (builder->IsPaintingToWindow()) {
    DisplayPortUtils::MaybeCreateDisplayPortInFirstScrollFrameEncountered(
        aFrame, builder);
  }

  nsRect visibleRect = visibleRegion.GetBounds();
  PartialUpdateResult updateState = PartialUpdateResult::Failed;