diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-02-04 23:58:08 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-04 23:58:08 +0100 |
commit | a9a672fd681acca009741acf24b5e2076843394d (patch) | |
tree | fda76eb6688358f101fc9ac4f4d99b0cc0abab26 /browser/base | |
parent | 7edd685eee95759d66a457cf428f42e0dda94671 (diff) | |
parent | 998542d94d86d2bf1f0ac247fcf478c31dcdafec (diff) | |
download | UXP-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-x | browser/base/content/browser.js | 6 |
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"); } } |