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
This commit is contained in:
Timothy Nikkel 2021-01-25 23:33:21 +00:00
Родитель b9384b091e
Коммит ce5fd1398c
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -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;