diff --git a/browser/base/content/browser-siteIdentity.js b/browser/base/content/browser-siteIdentity.js index fceae6718a1a..a0987058af5f 100644 --- a/browser/base/content/browser-siteIdentity.js +++ b/browser/base/content/browser-siteIdentity.js @@ -1279,8 +1279,7 @@ var gIdentityHandler = { let urlString = value + "\n" + gBrowser.contentTitle; let htmlString = '' + value + ""; - let windowUtils = window.windowUtils; - let scale = windowUtils.screenPixelsPerCSSPixel / windowUtils.fullZoom; + let scale = window.devicePixelRatio; let canvas = document.createElementNS( "http://www.w3.org/1999/xhtml", "canvas" diff --git a/browser/base/content/tabbrowser-tabs.js b/browser/base/content/tabbrowser-tabs.js index 6ce1cd7f53cf..b19166f6e74c 100644 --- a/browser/base/content/tabbrowser-tabs.js +++ b/browser/base/content/tabbrowser-tabs.js @@ -432,8 +432,7 @@ // Until canvas is HiDPI-aware (bug 780362), we need to scale the desired // canvas size (in CSS pixels) to the window's backing resolution in order // to get a full-resolution drag image for use on HiDPI displays. - let windowUtils = window.windowUtils; - let scale = windowUtils.screenPixelsPerCSSPixel / windowUtils.fullZoom; + let scale = window.devicePixelRatio; let canvas = this._dndCanvas; if (!canvas) { this._dndCanvas = canvas = document.createElementNS( diff --git a/browser/components/search/SearchOneOffs.jsm b/browser/components/search/SearchOneOffs.jsm index e6f88d58886f..5a773f979eec 100644 --- a/browser/components/search/SearchOneOffs.jsm +++ b/browser/components/search/SearchOneOffs.jsm @@ -474,7 +474,7 @@ class SearchOneOffs { // This is likely because the clientWidth getter rounds the value, but // the panel's border width is not an integer. // As a workaround, decrement the width if the scale is not an integer. - let scale = this.window.windowUtils.screenPixelsPerCSSPixel; + let scale = this.window.devicePixelRatio; if (Math.floor(scale) != scale) { --buttonsWidth; } diff --git a/browser/modules/WindowsPreviewPerTab.jsm b/browser/modules/WindowsPreviewPerTab.jsm index 0af57a89297f..6ee8a6f12533 100644 --- a/browser/modules/WindowsPreviewPerTab.jsm +++ b/browser/modules/WindowsPreviewPerTab.jsm @@ -202,20 +202,6 @@ PreviewController.prototype = { this.canvasPreview.height = aRequestedHeight; }, - get zoom() { - // Note that winutils.fullZoom accounts for "quantization" of the zoom factor - // from nsIContentViewer due to conversion through appUnits. - // We do -not- want screenPixelsPerCSSPixel here, because that would -also- - // incorporate any scaling that is applied due to hi-dpi resolution options. - return this.tab.linkedBrowser.fullZoom; - }, - - get screenPixelsPerCSSPixel() { - let chromeWin = this.tab.ownerGlobal; - let windowUtils = chromeWin.windowUtils; - return windowUtils.screenPixelsPerCSSPixel; - }, - get browserDims() { return this.tab.linkedBrowser.getBoundingClientRect(); }, @@ -295,7 +281,7 @@ PreviewController.prototype = { composite.mozOpaque = false; let ctx = composite.getContext("2d"); - let scale = this.screenPixelsPerCSSPixel / this.zoom; + let scale = this.win.devicePixelRatio; composite.width = winWidth * scale; composite.height = winHeight * scale;