From 3bf92f4b7112f4d074d253bf9ddaa0a2bdc690f7 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Mon, 18 Jul 2011 12:46:26 +1200 Subject: [PATCH 1/3] Bug 629196. Fix intermittent failures by censoring irrelevant pixels in test for bug 579323. --- layout/reftests/bugs/579323-1-ref.html | 17 +++++++++++++++-- layout/reftests/bugs/579323-1.html | 11 +++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/layout/reftests/bugs/579323-1-ref.html b/layout/reftests/bugs/579323-1-ref.html index ff931c3c3ba7..3fa53b3393e8 100644 --- a/layout/reftests/bugs/579323-1-ref.html +++ b/layout/reftests/bugs/579323-1-ref.html @@ -2,16 +2,29 @@ -
+
+
+
+
+
diff --git a/layout/reftests/bugs/579323-1.html b/layout/reftests/bugs/579323-1.html index ceb0bc5ab864..c725a89c4f6d 100644 --- a/layout/reftests/bugs/579323-1.html +++ b/layout/reftests/bugs/579323-1.html @@ -3,6 +3,7 @@ @@ -26,5 +33,9 @@ function doTest() { } window.addEventListener("MozReftestInvalidate", doTest, false); +
+
+
+
From 7e42d9cf65098ecd4856ae54cd01d48262a6a7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Mon, 18 Jul 2011 04:09:19 -0700 Subject: [PATCH 2/3] Bug 671258 - Wrong site preferences listed in the site identity container in the pageaction-reset entry --- mobile/chrome/content/common-ui.js | 14 ++++++++++---- mobile/chrome/content/webapps.xul | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/mobile/chrome/content/common-ui.js b/mobile/chrome/content/common-ui.js index 8a5ba196c360..0501a1f7ae47 100644 --- a/mobile/chrome/content/common-ui.js +++ b/mobile/chrome/content/common-ui.js @@ -1663,7 +1663,8 @@ var CharsetMenu = { var WebappsUI = { _dialog: null, _manifest: null, - + _perms: [], + checkBox: function(aEvent) { let elem = aEvent.originalTarget; let perm = elem.getAttribute("perm"); @@ -1692,7 +1693,8 @@ var WebappsUI = { aManifest = { uri: browser.currentURI.spec, name: browser.contentTitle, - icon: icon + icon: icon, + capabilities: [], }; } @@ -1706,10 +1708,12 @@ var WebappsUI = { let uri = Services.io.newURI(aManifest.uri, null, null); - let perms = [["offline", "offline-app"], ["geoloc", "geo"], ["notifications", "desktop-notifications"]]; + let perms = [["offline", "offline-app"], ["geoloc", "geo"], ["notifications", "desktop-notification"]]; + let self = this; perms.forEach(function(tuple) { let elem = document.getElementById("webapps-" + tuple[0] + "-checkbox"); let currentPerm = Services.perms.testExactPermission(uri, tuple[1]); + self._perms[tuple[1]] = (currentPerm == Ci.nsIPermissionManager.ALLOW_ACTION); if ((aManifest.capabilities && (aManifest.capabilities.indexOf(tuple[1]) != -1)) || (currentPerm == Ci.nsIPermissionManager.ALLOW_ACTION)) elem.checked = true; else @@ -1733,7 +1737,9 @@ var WebappsUI = { _updatePermission: function updatePermission(aId, aPerm) { try { let uri = Services.io.newURI(this._manifest.uri, null, null); - Services.perms.add(uri, aPerm, document.getElementById(aId).checked ? Ci.nsIPermissionManager.ALLOW_ACTION : Ci.nsIPermissionManager.DENY_ACTION); + let currentState = document.getElementById(aId).checked; + if (currentState != this._perms[aPerm]) + Services.perms.add(uri, aPerm, currentState ? Ci.nsIPermissionManager.ALLOW_ACTION : Ci.nsIPermissionManager.DENY_ACTION); } catch(e) { Cu.reportError(e); } diff --git a/mobile/chrome/content/webapps.xul b/mobile/chrome/content/webapps.xul index 9ea62ec0d4cd..b43febe5d61c 100644 --- a/mobile/chrome/content/webapps.xul +++ b/mobile/chrome/content/webapps.xul @@ -77,7 +77,7 @@ &webapps.perm.requested; -