From 365fc5321899376261dae8ed96a44dc898479c11 Mon Sep 17 00:00:00 2001 From: Gavin Sharp Date: Mon, 6 Oct 2008 15:18:55 -0400 Subject: [PATCH] Bug 458447: use whole pixels to position canvas, r=mfinkle --- mobile/chrome/content/browser-ui.js | 9 +++++---- mobile/chrome/content/deckbrowser.xml | 11 +++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/mobile/chrome/content/browser-ui.js b/mobile/chrome/content/browser-ui.js index 23e5f74509c7..5f0f15e940b1 100644 --- a/mobile/chrome/content/browser-ui.js +++ b/mobile/chrome/content/browser-ui.js @@ -82,12 +82,13 @@ var BrowserUI = { _faviconAdded : false, _setContentPosition : function (aProp, aValue) { + let value = Math.round(aValue); if (aProp == "left") { - gContentBox.style.marginLeft = aValue + "px"; - gContentBox.style.marginRight = -aValue + "px"; + gContentBox.style.marginLeft = value + "px"; + gContentBox.style.marginRight = -value + "px"; } else if (aProp == "top") { - gContentBox.style.marginTop = aValue + "px"; - gContentBox.style.marginBottom = -aValue + "px"; + gContentBox.style.marginTop = value + "px"; + gContentBox.style.marginBottom = -value + "px"; } }, get _contentTop() { diff --git a/mobile/chrome/content/deckbrowser.xml b/mobile/chrome/content/deckbrowser.xml index 18e93abc4427..706d76d1ef75 100644 --- a/mobile/chrome/content/deckbrowser.xml +++ b/mobile/chrome/content/deckbrowser.xml @@ -609,10 +609,13 @@