diff --git a/layout/painting/nsDisplayList.h b/layout/painting/nsDisplayList.h index b4083f8dbe09..60905bdf4f7e 100644 --- a/layout/painting/nsDisplayList.h +++ b/layout/painting/nsDisplayList.h @@ -1462,24 +1462,18 @@ public: nsRect visible = aVisibleRect; nsRect dirtyRectRelativeToDirtyFrame = aDirtyRect; +#ifdef MOZ_WIDGET_ANDROID if (nsLayoutUtils::IsFixedPosFrameInDisplayPort(aFrame) && aBuilder->IsPaintingToWindow()) { - // position: fixed items are reflowed into and only drawn inside the - // viewport, or the scroll position clamping scrollport size, if one is - // set. nsIPresShell* ps = aFrame->PresShell(); - if (ps->IsScrollPositionClampingScrollPortSizeSet()) { - dirtyRectRelativeToDirtyFrame = - nsRect(nsPoint(0, 0), ps->GetScrollPositionClampingScrollPortSize()); - visible = dirtyRectRelativeToDirtyFrame; -#ifdef MOZ_WIDGET_ANDROID - } else { + if (!ps->IsScrollPositionClampingScrollPortSizeSet()) { dirtyRectRelativeToDirtyFrame = nsRect(nsPoint(0, 0), aFrame->GetParent()->GetSize()); visible = dirtyRectRelativeToDirtyFrame; -#endif } } +#endif + *aOutDirtyRect = dirtyRectRelativeToDirtyFrame - aFrame->GetPosition(); visible -= aFrame->GetPosition();