From ad5df312585933c8c8d0dfe6153e17a6a45f53ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Wed, 11 Mar 2015 22:50:18 -0700 Subject: [PATCH] Backout c7c68c4389d6 (bug 1125713) for gaia app startup regression r=me --- dom/browser-element/BrowserElementChildPreload.js | 9 ++------- dom/browser-element/BrowserElementParent.js | 1 - .../mochitest/browserElement_LoadEvents.js | 12 +----------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js index b25240e7a9b..77b68c93bb0 100644 --- a/dom/browser-element/BrowserElementChildPreload.js +++ b/dom/browser-element/BrowserElementChildPreload.js @@ -113,8 +113,7 @@ BrowserElementChild.prototype = { .addProgressListener(this._progressListener, Ci.nsIWebProgress.NOTIFY_LOCATION | Ci.nsIWebProgress.NOTIFY_SECURITY | - Ci.nsIWebProgress.NOTIFY_STATE_WINDOW | - Ci.nsIWebProgress.NOTIFY_PROGRESS); + Ci.nsIWebProgress.NOTIFY_STATE_WINDOW); docShell.QueryInterface(Ci.nsIWebNavigation) .sessionHistory = Cc["@mozilla.org/browser/shistory;1"] @@ -1378,12 +1377,8 @@ BrowserElementChild.prototype = { }, onStatusChange: function(webProgress, request, status, message) {}, - onProgressChange: function(webProgress, request, curSelfProgress, - maxSelfProgress, curTotalProgress, maxTotalProgress) { - sendAsyncMsg('loadprogresschanged', { curTotalProgress: curTotalProgress, - maxTotalProgress: maxTotalProgress }); - }, + maxSelfProgress, curTotalProgress, maxTotalProgress) {}, }, // Expose the message manager for WebApps and others. diff --git a/dom/browser-element/BrowserElementParent.js b/dom/browser-element/BrowserElementParent.js index a81f0ba3fc4..d9aba4e82ea 100644 --- a/dom/browser-element/BrowserElementParent.js +++ b/dom/browser-element/BrowserElementParent.js @@ -181,7 +181,6 @@ BrowserElementParent.prototype = { "hello": this._recvHello, "loadstart": this._fireProfiledEventFromMsg, "loadend": this._fireProfiledEventFromMsg, - "loadprogresschanged": this._fireEventFromMsg, "close": this._fireEventFromMsg, "error": this._fireEventFromMsg, "firstpaint": this._fireProfiledEventFromMsg, diff --git a/dom/browser-element/mochitest/browserElement_LoadEvents.js b/dom/browser-element/mochitest/browserElement_LoadEvents.js index 7a50aad4e13..f08a0fad18d 100644 --- a/dom/browser-element/mochitest/browserElement_LoadEvents.js +++ b/dom/browser-element/mochitest/browserElement_LoadEvents.js @@ -13,8 +13,7 @@ function runTest() { // Load emptypage1 into the iframe, wait for that to finish loading, then // call runTest2. // - // This should trigger loadstart, locationchange, loadprogresschanged and - // loadend events. + // This should trigger loadstart, locationchange, and loadend events. var seenLoadEnd = false; var seenLoadStart = false; @@ -75,7 +74,6 @@ function runTest2() { var seenLoadStart = false; var seenLoadEnd = false; var seenLocationChange = false; - var seenLoadProgressChanged = false; // Add this event listener to the document; the events should bubble. document.addEventListener('mozbrowserloadstart', function(e) { @@ -105,14 +103,6 @@ function runTest2() { is(e.detail.backgroundColor, 'transparent', 'Expected background color reported') }); - iframe.addEventListener('mozbrowserloadprogresschanged', function(e) { - ok(e.isTrusted, 'Event should be trusted.'); - seenLoadProgressChanged = true; - ok(seenLoadStart, 'Load end after load start.'); - ok(seenLocationChange, 'Load end after location change.'); - ok(!seenLoadEnd, 'Load end after load progress.'); - }); - iframe.src = browserElementTestHelpers.emptyPage2; function waitForAllCallbacks() {