mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-24 16:54:08 +00:00
Bug 983475 - Remove shouldShowProgress method from browser.js. r=bnicholson
This commit is contained in:
parent
b6b650328c
commit
f5bc58a6a5
@ -644,9 +644,9 @@ public class Tab {
|
||||
return !AboutPages.isAboutPage(url);
|
||||
}
|
||||
|
||||
void handleDocumentStart(boolean showProgress, String url) {
|
||||
void handleDocumentStart(boolean restoring, String url) {
|
||||
setLoadProgress(LOAD_PROGRESS_START);
|
||||
setState(showProgress ? STATE_LOADING : STATE_SUCCESS);
|
||||
setState((!restoring && shouldShowProgress(url)) ? STATE_LOADING : STATE_SUCCESS);
|
||||
updateIdentityData(null);
|
||||
setReaderEnabled(false);
|
||||
}
|
||||
|
@ -446,8 +446,8 @@ public class Tabs implements GeckoEventListener {
|
||||
int state = message.getInt("state");
|
||||
if ((state & GeckoAppShell.WPL_STATE_IS_NETWORK) != 0) {
|
||||
if ((state & GeckoAppShell.WPL_STATE_START) != 0) {
|
||||
boolean showProgress = message.getBoolean("showProgress");
|
||||
tab.handleDocumentStart(showProgress, message.getString("uri"));
|
||||
boolean restoring = message.getBoolean("restoring");
|
||||
tab.handleDocumentStart(restoring, message.getString("uri"));
|
||||
notifyListeners(tab, Tabs.TabEvents.START);
|
||||
} else if ((state & GeckoAppShell.WPL_STATE_STOP) != 0) {
|
||||
tab.handleDocumentStop(message.getBoolean("success"));
|
||||
|
@ -241,10 +241,6 @@ function resolveGeckoURI(aURI) {
|
||||
return aURI;
|
||||
}
|
||||
|
||||
function shouldShowProgress(url) {
|
||||
return !url.startsWith("about:");
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache of commonly used string bundles.
|
||||
*/
|
||||
@ -3882,15 +3878,14 @@ Tab.prototype = {
|
||||
|
||||
// Check to see if we restoring the content from a previous presentation (session)
|
||||
// since there should be no real network activity
|
||||
let restoring = aStateFlags & Ci.nsIWebProgressListener.STATE_RESTORING;
|
||||
let showProgress = restoring ? false : shouldShowProgress(uri);
|
||||
let restoring = (aStateFlags & Ci.nsIWebProgressListener.STATE_RESTORING) > 0;
|
||||
|
||||
let message = {
|
||||
type: "Content:StateChange",
|
||||
tabID: this.id,
|
||||
uri: uri,
|
||||
state: aStateFlags,
|
||||
showProgress: showProgress,
|
||||
restoring: restoring,
|
||||
success: success
|
||||
};
|
||||
sendMessageToJava(message);
|
||||
|
Loading…
Reference in New Issue
Block a user