Bug 1856449 - Do not update chrome UI for iframe loads r=mconley

This is just Olli's patch unedited. Still in the process of double
checking on try, but it appears that this doesn't break any tests
and seems to work just fine. This patch just avoids showing the
status bar and updating the stop/reload button when loading iframe
content. This should not affect top level loads, and this matches
Chrome's behavior.

Differential Revision: https://phabricator.services.mozilla.com/D190616
This commit is contained in:
Olli Pettay 2023-10-13 15:51:53 +00:00
parent 7f48f900c7
commit 7c6d5205f0
2 changed files with 6 additions and 3 deletions

View File

@ -5081,7 +5081,10 @@ var XULBrowserWindow = {
this.isBusy = true;
if (!(aStateFlags & nsIWebProgressListener.STATE_RESTORING)) {
if (
!(aStateFlags & nsIWebProgressListener.STATE_RESTORING) &&
aWebProgress.isTopLevel
) {
this.busyUI = true;
// XXX: This needs to be based on window activity...
@ -5148,7 +5151,7 @@ var XULBrowserWindow = {
this.isBusy = false;
if (this.busyUI) {
if (this.busyUI && aWebProgress.isTopLevel) {
this.busyUI = false;
this.stopCommand.setAttribute("disabled", "true");

View File

@ -73,7 +73,7 @@ let prefHelper = async function (primary, customFn = null) {
// We're already on the correct pane.
readyPromise = Promise.resolve();
} else {
readyPromise = paintPromise(browserWindow);
readyPromise = new Promise(r => browserWindow.requestAnimationFrame(r));
}
} else {
readyPromise = TestUtils.topicObserved("sync-pane-loaded");