Bug 1267999 - An APZC cannot be checkerboarding if APZ is force-disabled for it. r=kats
authorBotond Ballo <botond@mozilla.com>
Wed, 25 May 2016 19:38:39 -0400
changeset 372385 ddd9b902f9e11e0e18709accab05982245e27dbe
parent 372384 d667c7bfcc25d1f3ae4c7e29a5030d223f3eaf5a
child 372386 e079016796cc75f450cdfddf4409c4a69bdfd710
push id19519
push userbmo:rail@mozilla.com
push dateSat, 28 May 2016 13:01:27 +0000
reviewerskats
bugs1267999
milestone49.0a1
Bug 1267999 - An APZC cannot be checkerboarding if APZ is force-disabled for it. r=kats MozReview-Commit-ID: Ai6aiRFBPl1
gfx/layers/apz/src/AsyncPanZoomController.cpp
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -3144,17 +3144,17 @@ AsyncPanZoomController::ReportCheckerboa
     }
     mCheckerboardEvent = nullptr;
   }
 }
 
 bool AsyncPanZoomController::IsCurrentlyCheckerboarding() const {
   ReentrantMonitorAutoEnter lock(mMonitor);
 
-  if (!gfxPrefs::APZAllowCheckerboarding()) {
+  if (!gfxPrefs::APZAllowCheckerboarding() || mScrollMetadata.IsApzForceDisabled()) {
     return false;
   }
 
   CSSPoint currentScrollOffset = mFrameMetrics.GetScrollOffset() + mTestAsyncScrollOffset;
   CSSRect painted = mLastContentPaintMetrics.GetDisplayPort() + mLastContentPaintMetrics.GetScrollOffset();
   painted.Inflate(CSSMargin::FromAppUnits(nsMargin(1, 1, 1, 1)));   // fuzz for rounding error
   CSSRect visible = CSSRect(currentScrollOffset, mFrameMetrics.CalculateCompositedSizeInCssPixels());
   if (painted.Contains(visible)) {