diff options
Diffstat (limited to 'browser/base/content')
-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"); } } |