Backout 21a070f6afcd for Android bustage
authorBrian Nicholson <bnicholson@mozilla.com>
Tue, 26 Jun 2012 18:07:13 -0700
changeset 97745 a4dc234066d25b32889a5b63de4252164d5108aa
parent 97744 431fa10c63a6697f6c4e8c5e03d982ddece507e6
child 97746 fee840205f5bf006b0e63b41e73a45b7306688db
push id22993
push useremorley@mozilla.com
push dateWed, 27 Jun 2012 10:31:27 +0000
treeherdermozilla-central@1a56f1f011c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone16.0a1
backs out21a070f6afcd6640546786bab91b21f6a7a914ab
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
Backout 21a070f6afcd for Android bustage
mobile/android/chrome/content/aboutApps.js
mobile/android/chrome/content/browser.js
mobile/android/themes/core/images/default-app-icon.png
mobile/android/themes/core/jar.mn
--- a/mobile/android/chrome/content/aboutApps.js
+++ b/mobile/android/chrome/content/aboutApps.js
@@ -39,17 +39,17 @@ function onLoad(aEvent) {
   navigator.mozApps.mgmt.oninstall = onInstall;
   navigator.mozApps.mgmt.onuninstall = onUninstall;
   updateList();
 
   let contextmenus = gChromeWin.NativeWindow.contextmenus;
   AppsUI.shortcut = contextmenus.add(gStrings.GetStringFromName("appsContext.shortcut"), contextmenus.SelectorContext("div[mozApp]"),
     function(aTarget) {
       let manifest = aTarget.manifest;
-      gChromeWin.WebappsUI.createShortcut(manifest.name, manifest.fullLaunchPath(), gChromeWin.WebappsUI.getBiggestIcon(manifest.icons), "webapp");
+      gChromeWin.WebappsUI.createShortcut(manifest.name, manifest.fullLaunchPath(), manifest.iconURLForSize("64"), "webapp");
     });
   AppsUI.uninstall = contextmenus.add(gStrings.GetStringFromName("appsContext.uninstall"), contextmenus.SelectorContext("div[mozApp]"),
     function(aTarget) {
       aTarget.app.uninstall();
 
       let manifest = aTarget.manifest;
       gChromeWin.sendMessageToJava({
         gecko: {
@@ -92,17 +92,17 @@ function addApplication(aApp) {
 
   let container = document.createElement("div");
   container.className = "app";
   container.setAttribute("id", "app-" + aApp.origin);
   container.setAttribute("mozApp", aApp.origin);
   container.setAttribute("title", manifest.name);
 
   let img = document.createElement("img");
-  img.src = gChromeWin.WebappsUI.getBiggestIcon(manifest.icons);
+  img.src = manifest.iconURLForSize("64");
   img.setAttribute("title", manifest.name);
 
   let title = document.createElement("div");
   title.appendChild(document.createTextNode(manifest.name));
 
   container.appendChild(img);
   container.appendChild(title);
   list.appendChild(container);
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -5699,17 +5699,17 @@ var WebappsUI = {
         // Wait until we know the app install worked, then make a homescreen shortcut
         DOMApplicationRegistry.getManifestFor(data.origin, (function(aManifest) {
           if (!aManifest)
             return;
           let manifest = new DOMApplicationManifest(aManifest, data.origin);
 
           // Add a homescreen shortcut -- we can't use createShortcut, since we need to pass
           // a unique ID for Android webapp allocation
-          this.makeBase64Icon(this.getBiggestIcon(manifest.icons),
+          this.makeBase64Icon(manifest.iconURLForSize("64"),
                               function(icon) {
                                 sendMessageToJava({
                                   gecko: {
                                     type: "WebApps:Install",
                                     name: manifest.name,
                                     launchPath: manifest.fullLaunchPath(),
                                     iconURL: icon,
                                     uniqueURI: data.origin
@@ -5735,28 +5735,17 @@ var WebappsUI = {
           gecko: {
             type: "WebApps:Uninstall",
             uniqueURI: data.origin
           }
         });
         break;
     }
   },
-
-  getBiggestIcon: function getBiggestIcon(aIcons) {
-    if (!aIcons)
-      return "chrome://browser/skin/images/default-app-icon.png";
   
-    let iconSizes = Object.keys(aIcons);
-    if (iconSizes.length == 0)
-      return "chrome://browser/skin/images/default-app-icon.png";
-    iconSizes.sort(function(a, b) a - b);
-    return aIcons[iconSizes.pop()];
-  }
-
   doInstall: function doInstall(aData) {
     let manifest = new DOMApplicationManifest(aData.app.manifest, aData.app.origin);
     let name = manifest.name ? manifest.name : manifest.fullLaunchPath();
     if (Services.prompt.confirm(null, Strings.browser.GetStringFromName("webapps.installTitle"), name))
       DOMApplicationRegistry.confirmInstall(aData);
     else
       DOMApplicationRegistry.denyInstall(aData);
   },
deleted file mode 100644
index 7c5e48cb8bea63eb814b30fd96cb55762bb1753c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/android/themes/core/jar.mn
+++ b/mobile/android/themes/core/jar.mn
@@ -27,17 +27,16 @@ chrome.jar:
   skin/images/arrowright-16.png             (images/arrowright-16.png)
   skin/images/arrowdown-16.png              (images/arrowdown-16.png)
   skin/images/checkbox_checked.png          (images/checkbox_checked.png)
   skin/images/checkbox_checked_disabled.png (images/checkbox_checked_disabled.png)
   skin/images/checkbox_checked_pressed.png  (images/checkbox_checked_pressed.png)
   skin/images/checkbox_unchecked.png          (images/checkbox_unchecked.png)
   skin/images/checkbox_unchecked_disabled.png (images/checkbox_unchecked_disabled.png)
   skin/images/checkbox_unchecked_pressed.png  (images/checkbox_unchecked_pressed.png)
-  skin/images/default-app-icon.png          (images/default-app-icon.png)
   skin/images/dropmarker.svg                (images/dropmarker.svg)
   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/search-clear-30.png           (images/search-clear-30.png)
   skin/images/play-hdpi.png                 (images/play-hdpi.png)