From e5bfce063b83253f7890157d0775309b87d2d290 Mon Sep 17 00:00:00 2001 From: Heather Arthur Date: Mon, 31 Mar 2014 15:26:53 -0700 Subject: [PATCH] Bug 939040 - Add eyedropper tool and include it in the color picker tooltip; r=pbrosset --- browser/app/profile/firefox.js | 3 + browser/base/content/browser-menubar.inc | 3 + browser/base/content/browser-sets.inc | 5 + browser/base/content/browser.js | 14 + browser/devtools/eyedropper/crosshairs.css | 3 + browser/devtools/eyedropper/eyedropper.js | 671 ++++++++++++++++++ browser/devtools/eyedropper/eyedropper.xul | 41 ++ browser/devtools/eyedropper/moz.build | 13 + browser/devtools/eyedropper/nocursor.css | 3 + browser/devtools/eyedropper/test/browser.ini | 8 + .../test/browser_eyedropper_basic.js | 75 ++ .../devtools/eyedropper/test/color-block.html | 22 + browser/devtools/eyedropper/test/head.js | 37 + browser/devtools/eyedropper/test/moz.build | 6 + browser/devtools/jar.mn | 4 + browser/devtools/moz.build | 1 + .../devtools/shared/test/browser_css_color.js | 136 ++-- browser/devtools/shared/widgets/Tooltip.js | 76 +- .../shared/widgets/spectrum-frame.xhtml | 1 + browser/devtools/shared/widgets/spectrum.css | 14 + browser/devtools/styleinspector/rule-view.js | 3 +- .../devtools/styleinspector/test/browser.ini | 2 + .../test/browser_ruleview_eyedropper.js | 141 ++++ .../locales/en-US/chrome/browser/browser.dtd | 3 + .../browser/devtools/eyedropper.properties | 14 + browser/locales/jar.mn | 1 + browser/themes/linux/jar.mn | 2 + browser/themes/osx/jar.mn | 3 + browser/themes/shared/devtools/common.css | 11 + browser/themes/shared/devtools/eyedropper.css | 45 ++ browser/themes/shared/devtools/filters.svg | 7 + .../devtools/images/eyedropper-black.png | Bin 0 -> 1698 bytes browser/themes/windows/jar.mn | 5 + toolkit/devtools/css-color.js | 84 ++- 34 files changed, 1344 insertions(+), 113 deletions(-) create mode 100644 browser/devtools/eyedropper/crosshairs.css create mode 100644 browser/devtools/eyedropper/eyedropper.js create mode 100644 browser/devtools/eyedropper/eyedropper.xul create mode 100644 browser/devtools/eyedropper/moz.build create mode 100644 browser/devtools/eyedropper/nocursor.css create mode 100644 browser/devtools/eyedropper/test/browser.ini create mode 100644 browser/devtools/eyedropper/test/browser_eyedropper_basic.js create mode 100644 browser/devtools/eyedropper/test/color-block.html create mode 100644 browser/devtools/eyedropper/test/head.js create mode 100644 browser/devtools/eyedropper/test/moz.build create mode 100644 browser/devtools/styleinspector/test/browser_ruleview_eyedropper.js create mode 100644 browser/locales/en-US/chrome/browser/devtools/eyedropper.properties create mode 100644 browser/themes/shared/devtools/eyedropper.css create mode 100644 browser/themes/shared/devtools/images/eyedropper-black.png diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index f69a01bb79d1..0e84f6a53ffa 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1274,6 +1274,9 @@ pref("devtools.hud.loglimit.cssparser", 200); pref("devtools.hud.loglimit.exception", 200); pref("devtools.hud.loglimit.console", 200); +// By how many times eyedropper will magnify pixels +pref("devtools.eyedropper.zoom", 6); + // The developer tools editor configuration: // - tabsize: how many spaces to use when a Tab character is displayed. // - expandtab: expand Tab characters to spaces. diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index de379b0eadb2..274763efe6c4 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -504,6 +504,9 @@ + diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index 5ee1abc01b1c..89e6cb5b69df 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -102,6 +102,7 @@ +