summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-06 09:34:25 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-06 09:34:25 -0500
commit0ab5c6474c6018c9f0b1910904038848e6cdcc18 (patch)
treee826086a21953f72963643108a99f388d3e99a2e /toolkit
parent7a0b23aab862a5a04f1f71a91e76fc2e03d93672 (diff)
downloaduxp-0ab5c6474c6018c9f0b1910904038848e6cdcc18.tar.gz
Issue #65 - Remove AppConstants from toolkit/components/thumbnails
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/thumbnails/PageThumbUtils.jsm5
-rw-r--r--toolkit/components/thumbnails/moz.build2
2 files changed, 4 insertions, 3 deletions
diff --git a/toolkit/components/thumbnails/PageThumbUtils.jsm b/toolkit/components/thumbnails/PageThumbUtils.jsm
index dda3a81b3c..fb5d67ddb5 100644
--- a/toolkit/components/thumbnails/PageThumbUtils.jsm
+++ b/toolkit/components/thumbnails/PageThumbUtils.jsm
@@ -14,7 +14,6 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/AppConstants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm");
@@ -72,15 +71,17 @@ this.PageThumbUtils = {
let windowScale = aWindow ? aWindow.devicePixelRatio : systemScale;
let scale = Math.max(systemScale, windowScale);
+#ifdef XP_MACOSX
/** *
* On retina displays, we can sometimes go down this path
* without a window object. In those cases, force 2x scaling
* as the system scale doesn't represent the 2x scaling
* on OS X.
*/
- if (AppConstants.platform == "macosx" && !aWindow) {
+ if (!aWindow) {
scale = 2;
}
+#endif
/** *
* THESE VALUES ARE DEFINED IN newtab.css and hard coded.
diff --git a/toolkit/components/thumbnails/moz.build b/toolkit/components/thumbnails/moz.build
index e4a178998f..bd7c1d3444 100644
--- a/toolkit/components/thumbnails/moz.build
+++ b/toolkit/components/thumbnails/moz.build
@@ -15,11 +15,11 @@ EXTRA_COMPONENTS += [
EXTRA_JS_MODULES += [
'PageThumbs.jsm',
'PageThumbsWorker.js',
- 'PageThumbUtils.jsm',
]
EXTRA_PP_JS_MODULES += [
'BackgroundPageThumbs.jsm',
+ 'PageThumbUtils.jsm',
]