diff --git a/gfx/layers/client/TiledContentClient.cpp b/gfx/layers/client/TiledContentClient.cpp index 184d041adc3d..467dfa74f719 100644 --- a/gfx/layers/client/TiledContentClient.cpp +++ b/gfx/layers/client/TiledContentClient.cpp @@ -1392,7 +1392,7 @@ ClientTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& aInval // first, and see if we should just abort this paint. Aborting is usually // caused by there being an incoming, more relevant paint. ViewTransform viewTransform; -#if defined(MOZ_WIDGET_ANDROID) +#if defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_ANDROID_APZ) FrameMetrics compositorMetrics = scrollAncestor->GetFrameMetrics(); bool abortPaint = false; // On Android, only the primary scrollable layer is async-scrolled, and the only one diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 850fa99d094a..e6b07f734b82 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -6763,7 +6763,7 @@ nsLayoutUtils::CalculateScrollableRectForFrame(nsIScrollableFrame* aScrollableFr // provide the special behaviour, this code will cause it to break. We can remove // the ifndef once Fennec switches over to APZ or if we add the special handling // to Fennec -#ifndef MOZ_WIDGET_ANDROID +#if !defined(MOZ_WIDGET_ANDROID) || defined(MOZ_ANDROID_APZ) nsPoint scrollPosition = aScrollableFrame->GetScrollPosition(); if (aScrollableFrame->GetScrollbarStyles().mVertical == NS_STYLE_OVERFLOW_HIDDEN) { contentBounds.y = scrollPosition.y;