Bug 983475 - Remove shouldShowProgress method from browser.js. r=bnicholson

This commit is contained in:
Vlad Tanase 2014-03-19 16:08:05 +02:00
parent b6b650328c
commit f5bc58a6a5
3 changed files with 6 additions and 11 deletions

View File

@ -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);
}

View File

@ -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"));

View File

@ -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);