summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-06 09:47:45 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-06 09:47:45 -0500
commit741abd440e4f4c4d91799f06c826e0f879c5c837 (patch)
tree8827ea4ef97646a2c8f193d0a396c38d06c4dedf /toolkit
parent0749a35be9b6c699211ddb54dbbf8406d4aadf6e (diff)
downloadUXP-741abd440e4f4c4d91799f06c826e0f879c5c837.tar
UXP-741abd440e4f4c4d91799f06c826e0f879c5c837.tar.gz
UXP-741abd440e4f4c4d91799f06c826e0f879c5c837.tar.lz
UXP-741abd440e4f4c4d91799f06c826e0f879c5c837.tar.xz
UXP-741abd440e4f4c4d91799f06c826e0f879c5c837.zip
Issue #65 - Remove AppConstants from toolkit/components/alerts
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/alerts/jar.mn2
-rw-r--r--toolkit/components/alerts/resources/content/alert.js12
2 files changed, 9 insertions, 5 deletions
diff --git a/toolkit/components/alerts/jar.mn b/toolkit/components/alerts/jar.mn
index c45939078..c9bd127dd 100644
--- a/toolkit/components/alerts/jar.mn
+++ b/toolkit/components/alerts/jar.mn
@@ -5,4 +5,4 @@
toolkit.jar:
content/global/alerts/alert.css (resources/content/alert.css)
content/global/alerts/alert.xul (resources/content/alert.xul)
- content/global/alerts/alert.js (resources/content/alert.js)
+* content/global/alerts/alert.js (resources/content/alert.js)
diff --git a/toolkit/components/alerts/resources/content/alert.js b/toolkit/components/alerts/resources/content/alert.js
index 12068b548..e9725bedb 100644
--- a/toolkit/components/alerts/resources/content/alert.js
+++ b/toolkit/components/alerts/resources/content/alert.js
@@ -4,7 +4,6 @@
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/Services.jsm");
/*
@@ -26,10 +25,15 @@ const NS_ALERT_HORIZONTAL = 1;
const NS_ALERT_LEFT = 2;
const NS_ALERT_TOP = 4;
-const WINDOW_MARGIN = AppConstants.platform == "win" ? 0 : 10;
-const BODY_TEXT_LIMIT = 200;
-const WINDOW_SHADOW_SPREAD = AppConstants.platform == "win" ? 10 : 0;
+#ifdef XP_WIN
+const WINDOW_MARGIN = 0;
+const WINDOW_SHADOW_SPREAD = 10;
+#else
+const WINDOW_MARGIN = 10;
+const WINDOW_SHADOW_SPREAD = 0;
+#endif
+const BODY_TEXT_LIMIT = 200;
var gOrigin = 0; // Default value: alert from bottom right.
var gReplacedWindow = null;