Bug 1664101 - Fix an incorrect usage of the visual viewport offset in ComputeVisibleRectForFrame(). r=kats

It's used as the offset of the visible rect, which is intended to be
relative to the layout viewport.

This is mostly hidden by the fact that we almost always
overwrite this value with the displayport rect offset.

Differential Revision: https://phabricator.services.mozilla.com/D90784
This commit is contained in:
Botond Ballo 2020-10-07 22:34:47 +00:00
Родитель 3a86574eae
Коммит c4fb54eee1
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -501,7 +501,7 @@ nsRect nsDisplayListBuilder::OutOfFlowDisplayData::ComputeVisibleRectForFrame(
PresShell* presShell = aFrame->PresShell();
if (presShell->IsVisualViewportSizeSet()) {
dirtyRectRelativeToDirtyFrame =
nsRect(presShell->GetVisualViewportOffset(),
nsRect(presShell->GetVisualViewportOffsetRelativeToLayoutViewport(),
presShell->GetVisualViewportSize());
// But if we have a displayport, expand it to the displayport, so
// that async-scrolling the visual viewport within the layout viewport