mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Issue #65 - Remove AppConstants from toolkit/components/thumbnails
This commit is contained in:
parent
e0ad4cf19a
commit
6dbe4aff96
2 changed files with 4 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@ EXTRA_COMPONENTS += [
|
|||
EXTRA_JS_MODULES += [
|
||||
'PageThumbs.jsm',
|
||||
'PageThumbsWorker.js',
|
||||
'PageThumbUtils.jsm',
|
||||
]
|
||||
|
||||
EXTRA_PP_JS_MODULES += [
|
||||
'BackgroundPageThumbs.jsm',
|
||||
'PageThumbUtils.jsm',
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue