Bug 1046344 - Update some ifdefs to account for MOZ_ANDROID_APZ. r=snorp
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 08 Aug 2014 17:42:25 -0400
changeset 198681 fcc3d8857f00a87a706c5084ffe0652e2b9f0266
parent 198680 3cb6a9651e0a2e4d37b25f2278392450c5898a1b
child 198682 68d1fa234605bc32666ddb6896a5c420d99dfbdc
push id27284
push userryanvm@gmail.com
push dateSat, 09 Aug 2014 15:25:31 +0000
treeherdermozilla-central@ad8cb646fad6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1046344
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1046344 - Update some ifdefs to account for MOZ_ANDROID_APZ. r=snorp
gfx/layers/client/TiledContentClient.cpp
layout/base/nsLayoutUtils.cpp
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -1387,17 +1387,17 @@ ClientTiledLayerBuffer::ComputeProgressi
 
   ContainerLayer* scrollAncestor = nullptr;
   mThebesLayer->GetAncestorLayers(&scrollAncestor, nullptr);
 
   // Find out the current view transform to determine which tiles to draw
   // 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
   // that the Java-side code can provide details about. If we're tiling some other layer
   // then we already have all the information we need about it.
   if (scrollAncestor == mManager->GetPrimaryScrollableLayer()) {
     abortPaint = mManager->ProgressiveUpdateCallback(!staleRegion.Contains(aInvalidRegion),
                                                      compositorMetrics,
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -6758,17 +6758,17 @@ nsLayoutUtils::CalculateScrollableRectFo
   if (aScrollableFrame) {
     contentBounds = aScrollableFrame->GetScrollRange();
 
     // We ifndef the below code for Fennec because it requires special behaviour
     // on the APZC side. Because Fennec has it's own PZC implementation which doesn't
     // 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;
       contentBounds.height = 0;
     }
     if (aScrollableFrame->GetScrollbarStyles().mHorizontal == NS_STYLE_OVERFLOW_HIDDEN) {
       contentBounds.x = scrollPosition.x;
       contentBounds.width = 0;