From e1c3302196ec8c0a6f145d4689747665b47894bb Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Sat, 2 Mar 2013 07:51:42 -0500 Subject: [PATCH] Bug 822666 - Robustify zoom comparison warning against floating point rounding. r=Cwiiis --- mobile/android/chrome/content/browser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index dccfa33a66e..5b8899b9d15 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -3081,8 +3081,8 @@ Tab.prototype = { this._drawZoom = resolution; cwu.setResolution(resolution, resolution); } - } else if (resolution != zoom) { - dump("Warning: setDisplayPort resolution did not match zoom for background tab!"); + } else if (Math.abs(resolution - zoom) >= 1e-6) { + dump("Warning: setDisplayPort resolution did not match zoom for background tab! (" + resolution + " != " + zoom + ")"); } // Finally, we set the display port, taking care to convert everything into the CSS-pixel