summaryrefslogtreecommitdiffstats
path: root/browser/base
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-04 23:58:08 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-04 23:58:08 +0100
commita9a672fd681acca009741acf24b5e2076843394d (patch)
treefda76eb6688358f101fc9ac4f4d99b0cc0abab26 /browser/base
parent7edd685eee95759d66a457cf428f42e0dda94671 (diff)
parent998542d94d86d2bf1f0ac247fcf478c31dcdafec (diff)
downloadUXP-a9a672fd681acca009741acf24b5e2076843394d.tar
UXP-a9a672fd681acca009741acf24b5e2076843394d.tar.gz
UXP-a9a672fd681acca009741acf24b5e2076843394d.tar.lz
UXP-a9a672fd681acca009741acf24b5e2076843394d.tar.xz
UXP-a9a672fd681acca009741acf24b5e2076843394d.zip
Merge branch 'ported-moebius'
Diffstat (limited to 'browser/base')
-rwxr-xr-xbrowser/base/content/browser.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 7b05e1da7..7aaaa09aa 100755
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1055,8 +1055,10 @@ var gBrowserInit = {
window.matchMedia("(-moz-windows-default-theme)").matches) {
let windowFrameColor = new Color(...Cu.import("resource:///modules/Windows8WindowFrameColor.jsm", {})
.Windows8WindowFrameColor.get());
- // Default to black for foreground text.
- if (!windowFrameColor.isContrastRatioAcceptable(new Color(0, 0, 0))) {
+ // Check if window frame color is dark.
+ if ((windowFrameColor.r * 2 +
+ windowFrameColor.g * 5 +
+ windowFrameColor.b) <= 128 * 8) {
document.documentElement.setAttribute("darkwindowframe", "true");
}
}