Bug 1493208 - Tweak scrollable rect offset to (0, 0) for the popup window opened by extensions. r=botond

So that we can make sure APZ handles (0, 0) based coordinates for remote
contents in popup windows, etc.

Differential Revision: https://phabricator.services.mozilla.com/D99309
This commit is contained in:
Hiroyuki Ikezoe 2020-12-14 21:21:33 +00:00
Родитель ff22c99547
Коммит 493c9d70d3
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -8045,6 +8045,9 @@ nsRect nsLayoutUtils::CalculateScrollableRectForFrame(
contentBounds.height += aScrollableFrame->GetScrollPortRect().height;
} else {
contentBounds = aRootFrame->GetRect();
// Clamp to (0, 0) if there is no corresponding scrollable frame for the
// given |aRootFrame|.
contentBounds.MoveTo(0, 0);
}
return contentBounds;
}