Bug 1284553 - Use a fuzzy-compare for the presShell resolution so that negligible differences don't block all repaint requests. r?botond draft
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 05 Jul 2016 14:02:46 -0400
changeset 384151 0f96d8f8b74bc9c8975c482cbdd063a4d22a6a00
parent 384060 dbb31bcad5a1f60a35b5600ea1578d9b9fa55237
child 524624 ff91557f6dbfa1d90f2de5eba24b5fea7406300c
push id22183
push userkgupta@mozilla.com
push dateTue, 05 Jul 2016 18:03:08 +0000
reviewersbotond
bugs1284553
milestone50.0a1
Bug 1284553 - Use a fuzzy-compare for the presShell resolution so that negligible differences don't block all repaint requests. r?botond MozReview-Commit-ID: EhyhYYLgssQ
gfx/layers/apz/util/APZCCallbackHelper.cpp
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -244,17 +244,17 @@ APZCCallbackHelper::UpdateRootFrame(Fram
     // to be returned by window.innerWidth/innerHeight (see bug 1187792).
 
     float presShellResolution = shell->GetResolution();
 
     // If the pres shell resolution has changed on the content side side
     // the time this repaint request was fired, consider this request out of date
     // and drop it; setting a zoom based on the out-of-date resolution can have
     // the effect of getting us stuck with the stale resolution.
-    if (presShellResolution != aMetrics.GetPresShellResolution()) {
+    if (!FuzzyEqualsMultiplicative(presShellResolution, aMetrics.GetPresShellResolution())) {
       return;
     }
 
     // The pres shell resolution is updated by the the async zoom since the
     // last paint.
     presShellResolution = aMetrics.GetPresShellResolution()
                         * aMetrics.GetAsyncZoom().scale;
     shell->SetResolutionAndScaleTo(presShellResolution);