diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-04 14:35:31 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-04 14:35:31 -0500 |
commit | 7edd685eee95759d66a457cf428f42e0dda94671 (patch) | |
tree | c4514958ea133084552be32d331c115afc509daa /browser/components/extensions | |
parent | 0083d404eff36f873cde465d50cd34b112bd124f (diff) | |
parent | fc7d9fade54dfbe275c4808dabe30a19415082e0 (diff) | |
download | UXP-7edd685eee95759d66a457cf428f42e0dda94671.tar UXP-7edd685eee95759d66a457cf428f42e0dda94671.tar.gz UXP-7edd685eee95759d66a457cf428f42e0dda94671.tar.lz UXP-7edd685eee95759d66a457cf428f42e0dda94671.tar.xz UXP-7edd685eee95759d66a457cf428f42e0dda94671.zip |
Merge branch 'master' into configurebuild-work
Diffstat (limited to 'browser/components/extensions')
-rw-r--r-- | browser/components/extensions/ext-browserAction.js | 8 | ||||
-rw-r--r-- | browser/components/extensions/ext-utils.js | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/browser/components/extensions/ext-browserAction.js b/browser/components/extensions/ext-browserAction.js index 97c6fd22c..407366e2c 100644 --- a/browser/components/extensions/ext-browserAction.js +++ b/browser/components/extensions/ext-browserAction.js @@ -9,9 +9,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "clearTimeout", XPCOMUtils.defineLazyModuleGetter(this, "setTimeout", "resource://gre/modules/Timer.jsm"); -XPCOMUtils.defineLazyGetter(this, "colorUtils", () => { - return require("devtools/shared/css/color").colorUtils; -}); +XPCOMUtils.defineLazyServiceGetter(this, "DOMUtils", + "@mozilla.org/inspector/dom-utils;1", + "inIDOMUtils"); Cu.import("resource://devtools/shared/event-emitter.js"); Cu.import("resource://gre/modules/ExtensionUtils.jsm"); @@ -511,7 +511,7 @@ extensions.registerSchemaAPI("browserAction", "addon_parent", context => { let tab = details.tabId !== null ? TabManager.getTab(details.tabId, context) : null; let color = details.color; if (!Array.isArray(color)) { - let col = colorUtils.colorToRGBA(color); + let col = DOMUtils.colorToRGBA(color); color = col && [col.r, col.g, col.b, Math.round(col.a * 255)]; } BrowserAction.for(extension).setProperty(tab, "badgeBackgroundColor", color); diff --git a/browser/components/extensions/ext-utils.js b/browser/components/extensions/ext-utils.js index 57c38a339..75b2f4bd4 100644 --- a/browser/components/extensions/ext-utils.js +++ b/browser/components/extensions/ext-utils.js @@ -17,10 +17,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "styleSheetService", "@mozilla.org/content/style-sheet-service;1", "nsIStyleSheetService"); -XPCOMUtils.defineLazyGetter(this, "colorUtils", () => { - return require("devtools/shared/css/color").colorUtils; -}); - Cu.import("resource://gre/modules/ExtensionUtils.jsm"); Cu.import("resource://gre/modules/AppConstants.jsm"); |