Bug 841119 - Remove unused images and styles from /browser/metro/theme [r=jimm]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 13 Feb 2013 12:32:33 -0800
changeset 131668 1b7cf47e45f8f7c54f7564cd1e47d4533f988851
parent 131667 d75207733e669287632f65cc09174f10779407c3
child 131669 1aa496327ae68d19424555efb4d65c4275858774
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs841119
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 841119 - Remove unused images and styles from /browser/metro/theme [r=jimm]
browser/metro/base/content/ContextCommands.js
browser/metro/base/content/Util.js
browser/metro/theme/header.css
browser/metro/theme/images/aboutBackground.jpg
browser/metro/theme/images/check-30.png
browser/metro/theme/images/check-selected-30.png
browser/metro/theme/images/check-unselected-30.png
browser/metro/theme/images/checkmark-hdpi.png
browser/metro/theme/images/homescreen-blank-hdpi.png
browser/metro/theme/images/homescreen-default-hdpi.png
browser/metro/theme/images/loading.png
browser/metro/theme/images/more-active.png
browser/metro/theme/images/mozilla-32.png
browser/metro/theme/images/search-clear-30.png
browser/metro/theme/images/section-collapsed-16.png
browser/metro/theme/images/section-expanded-16.png
browser/metro/theme/jar.mn
--- a/browser/metro/base/content/ContextCommands.js
+++ b/browser/metro/base/content/ContextCommands.js
@@ -178,21 +178,16 @@ var ContextCommands = {
     target.startEditing();
   },
 
   removeBookmark: function cc_removeBookmark() {
     let target = ContextMenuUI.popupState.target;
     target.remove();
   },
 
-  shortcutBookmark: function cc_shortcutBookmark() {
-    let target = ContextMenuUI.popupState.target;
-    Util.createShortcut(target.getAttribute("title"), target.getAttribute("uri"), target.getAttribute("src"), "bookmark");
-  },
-
   findInPage: function cc_findInPage() {
     FindHelperUI.show();
   },
 
   viewOnDesktop: function cc_viewOnDesktop() {
     Appbar.onViewOnDesktop();
   },
 
--- a/browser/metro/base/content/Util.js
+++ b/browser/metro/base/content/Util.js
@@ -276,75 +276,16 @@ let Util = {
     //dm.resumeDownload(download);
     //Services.obs.notifyObservers(download, "dl-start", null);
   },
 
   /*
    * Local system utilities
    */
 
-  createShortcut: function Util_createShortcut(aTitle, aURL, aIconURL, aType) {
-    // The background images are 72px, but Android will resize as needed.
-    // Bigger is better than too small.
-    const kIconSize = 72;
-    const kOverlaySize = 32;
-    const kOffset = 20;
-
-    // We have to fallback to something
-    aTitle = aTitle || aURL;
-
-    let canvas = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
-    canvas.setAttribute("style", "display: none");
-
-    function _createShortcut() {
-      let icon = canvas.toDataURL("image/png", "");
-      canvas = null;
-      try {
-        let shell = Cc["@mozilla.org/browser/shell-service;1"].createInstance(Ci.nsIShellService);
-        shell.createShortcut(aTitle, aURL, icon, aType);
-      } catch(e) {
-        Cu.reportError(e);
-      }
-    }
-
-    // Load the main background image first
-    let image = new Image();
-    image.onload = function() {
-      canvas.width = canvas.height = kIconSize;
-      let ctx = canvas.getContext("2d");
-      ctx.drawImage(image, 0, 0, kIconSize, kIconSize);
-
-      // If we have a favicon, lets draw it next
-      if (aIconURL) {
-        let favicon = new Image();
-        favicon.onload = function() {
-          // Center the favicon and overlay it on the background
-          ctx.drawImage(favicon, kOffset, kOffset, kOverlaySize, kOverlaySize);
-          _createShortcut();
-        }
-
-        favicon.onerror = function() {
-          Cu.reportError("CreateShortcut: favicon image load error");
-        }
-
-        favicon.src = aIconURL;
-      } else {
-        _createShortcut();
-      }
-    }
-
-    image.onerror = function() {
-      Cu.reportError("CreateShortcut: background image load error");
-    }
-
-    // Pick the right background
-    image.src = aIconURL ? "chrome://browser/skin/images/homescreen-blank-hdpi.png"
-                         : "chrome://browser/skin/images/homescreen-default-hdpi.png";
-  },
-
   copyImageToClipboard: function Util_copyImageToClipboard(aImageLoadingContent) {
     let image = aImageLoadingContent.QueryInterface(Ci.nsIImageLoadingContent);
     if (!image) {
       Util.dumpLn("copyImageToClipboard error: image is not an nsIImageLoadingContent");
       return;
     }
     try {
       let xferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
deleted file mode 100644
--- a/browser/metro/theme/header.css
+++ /dev/null
@@ -1,14 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-body {
-  font-family: helvetica,arial,clean,sans-serif;
-  color: #69645c;
-  background: white url("images/aboutBackground.jpg") top center repeat-x;
-}
-
-#wrapper {
-  max-width: 600px;
-  margin: 0 auto;
-}
deleted file mode 100644
index 5dba1c58eb5afa5f929f09d61a46dbe7bb277cd1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 82cf8f415fa7e89918c521e474c6729e66ecf95a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index a29f65655ef5292621f3eb8094e9836c8fee1a0d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 054c7373b405de8da050c35d8b817ed4dd29c31d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index affc84c69603a663e32bda7b5ca5569897ff3adf..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 066864cf79ef33372ac318185545824d32357e87..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 963b5770fd95a84c25216a13157ee2292bf0a572..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ba54836e9834f2c495bcfb05738b56481b2dbed0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1a41a5ad23aefb7804c48a12ef0f44488e8cecb7..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 98d8789e274a3a705fe6d7c89a342ef49a4db042..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 8bab39a08d350a1915c2fd1ae871333be1c9dd72..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c9805f654c79b22ce0d8435d030e775f3b7492ac..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 128cef90af66bdf67d9d88d3b161fca8f6fe3788..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/metro/theme/jar.mn
+++ b/browser/metro/theme/jar.mn
@@ -8,17 +8,16 @@ chrome.jar:
 % skin browser classic/1.0 %skin/
   skin/aboutPage.css                        (aboutPage.css)
   skin/about.css                            (about.css)
   skin/flyoutpanel.css                      (flyoutpanel.css)
 * skin/browser.css                          (browser.css)
 * skin/content.css                          (content.css)
   skin/config.css                           (config.css)
 * skin/forms.css                            (forms.css)
-  skin/header.css                           (header.css)
 * skin/platform.css                         (platform.css)
   skin/touchcontrols.css                    (touchcontrols.css)
   skin/netError.css                         (netError.css)
 % override chrome://global/skin/about.css chrome://browser/skin/about.css
 % override chrome://global/skin/media/videocontrols.css chrome://browser/skin/touchcontrols.css
 % override chrome://global/skin/netError.css chrome://browser/skin/netError.css
 
   skin/images/panel-light.png               (images/panel-light.png)
@@ -37,54 +36,43 @@ chrome.jar:
   skin/images/tab-selection-right.png       (images/tab-selection-right.png)
   skin/images/identity-icons-generic.png    (images/identity-icons-generic.png)
   skin/images/identity-icons-https-ev.png   (images/identity-icons-https-ev.png)
   skin/images/identity-icons-https-mixed.png  (images/identity-icons-https-mixed.png)
   skin/images/identity-icons-https.png      (images/identity-icons-https.png)
   skin/images/firefox-watermark.png         (images/firefox-watermark.png)
   skin/images/flyout-back-button.png        (images/flyout-back-button.png)
   skin/images/about-footer.png              (images/about-footer.png)
-  skin/images/aboutBackground.jpg           (images/aboutBackground.jpg)
   skin/images/button-bg.png                 (images/button-bg.png)
   skin/images/arrowleft-16.png              (images/arrowleft-16.png)
   skin/images/arrowright-16.png             (images/arrowright-16.png)
   skin/images/arrowup-16.png                (images/arrowup-16.png)
   skin/images/arrowdown-16.png              (images/arrowdown-16.png)
   skin/images/arrowleftdark-16.png          (images/arrowleftdark-16.png)
   skin/images/arrowrightdark-16.png         (images/arrowrightdark-16.png)
   skin/images/arrowupdark-16.png            (images/arrowupdark-16.png)
   skin/images/arrowdowndark-16.png          (images/arrowdowndark-16.png)
   skin/images/popup-bg-hdpi.png             (images/popup-bg-hdpi.png)
   skin/images/popup-selected-item-hdpi.png  (images/popup-selected-item-hdpi.png)
   skin/images/arrowbox-up.png               (images/arrowbox-up.png)
   skin/images/arrowbox-down.png             (images/arrowbox-down.png)
   skin/images/arrowbox-horiz.png            (images/arrowbox-horiz.png)
-  skin/images/checkmark-hdpi.png                 (images/checkmark-hdpi.png)
-  skin/images/check-selected-30.png         (images/check-selected-30.png)
-  skin/images/check-unselected-30.png       (images/check-unselected-30.png)
   skin/images/favicon-default-32.png        (images/favicon-default-32.png)
   skin/images/errorpage-warning.png         (images/errorpage-warning.png)
   skin/images/errorpage-warning.png         (images/errorpage-warning.png)
   skin/images/errorpage-larry-white.png     (images/errorpage-larry-white.png)
   skin/images/errorpage-larry-black.png     (images/errorpage-larry-black.png)
   skin/images/throbber.png                  (images/throbber.png)
   skin/images/stop-hdpi.png                 (images/stop-hdpi.png)
   skin/images/alert-downloads-30.png        (images/alert-downloads-30.png)
-  skin/images/mozilla-32.png                (images/mozilla-32.png)
   skin/images/identity-default-hdpi.png     (images/identity-default-hdpi.png)
   skin/images/identity-ssl-hdpi.png         (images/identity-ssl-hdpi.png)
   skin/images/identity-ev-hdpi.png          (images/identity-ev-hdpi.png)
   skin/images/unlocked-hdpi.png             (images/unlocked-hdpi.png)
   skin/images/locked-hdpi.png               (images/locked-hdpi.png)
-  skin/images/check-30.png                  (images/check-30.png)
   skin/images/search-glass-30.png           (images/search-glass-30.png)
-  skin/images/search-clear-30.png           (images/search-clear-30.png)
-  skin/images/section-expanded-16.png       (images/section-expanded-16.png)
-  skin/images/section-collapsed-16.png      (images/section-collapsed-16.png)
   skin/images/play-hdpi.png                 (images/play-hdpi.png)
   skin/images/pause-hdpi.png                (images/pause-hdpi.png)
   skin/images/mute-hdpi.png                 (images/mute-hdpi.png)
   skin/images/unmute-hdpi.png               (images/unmute-hdpi.png)
   skin/images/scrubber-hdpi.png             (images/scrubber-hdpi.png)
   skin/images/selection-monocle.png         (images/selection-monocle.png)
-  skin/images/homescreen-blank-hdpi.png     (images/homescreen-blank-hdpi.png)
-  skin/images/homescreen-default-hdpi.png   (images/homescreen-default-hdpi.png)
   skin/images/appbar-icons.png              (images/appbar-icons.png)