Bug 1772859 - Expand visible rect height if dynamic toolbar is collapsed. r=tnikkel

When the dynamic toolbar is completely collapsed and calculating the visible
rect for out of flow content, ensure that the visible rect is expanded to
include the dynamic toolbar max height.

Differential Revision: https://phabricator.services.mozilla.com/D152807
This commit is contained in:
Dan Robertson 2022-08-16 01:20:05 +00:00
Родитель ff67736d1c
Коммит 7460f1a302
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -3196,6 +3196,14 @@ void nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
nsRect rootInkOverflow = aFrame->InkOverflowRectRelativeToSelf();
// If the dynamic toolbar is completely collapsed, the visible rect should
// be expanded to include this area.
if (presContext->IsRootContentDocumentCrossProcess() &&
presContext->HasDynamicToolbar()) {
rootInkOverflow.SizeTo(nsLayoutUtils::ExpandHeightForDynamicToolbar(
presContext, rootInkOverflow.Size()));
}
// If we are in a remote browser, then apply clipping from ancestor browsers
if (BrowserChild* browserChild = BrowserChild::GetFrom(presShell)) {
if (!browserChild->IsTopLevel()) {