зеркало из https://github.com/mozilla/gecko-dev.git
Bug 895567 - Fix for start page flashing into view during initial load of a page. r=sfoster
This commit is contained in:
Родитель
c0de3a4a2b
Коммит
c509b44ac0
|
@ -141,15 +141,20 @@ const WebProgress = {
|
|||
_networkStart: function _networkStart(aJson, aTab) {
|
||||
aTab.startLoading();
|
||||
|
||||
if (aTab == Browser.selectedTab)
|
||||
BrowserUI.update(TOOLBARSTATE_LOADING);
|
||||
if (aTab == Browser.selectedTab) {
|
||||
// NO_STARTUI_VISIBILITY since the current uri for the tab has not
|
||||
// been updated yet. If we're coming off of the start page, this
|
||||
// would briefly show StartUI until _locationChange is called.
|
||||
BrowserUI.update(BrowserUI.NO_STARTUI_VISIBILITY);
|
||||
}
|
||||
},
|
||||
|
||||
_networkStop: function _networkStop(aJson, aTab) {
|
||||
aTab.endLoading();
|
||||
|
||||
if (aTab == Browser.selectedTab)
|
||||
BrowserUI.update(TOOLBARSTATE_LOADED);
|
||||
if (aTab == Browser.selectedTab) {
|
||||
BrowserUI.update();
|
||||
}
|
||||
},
|
||||
|
||||
_windowStart: function _windowStart(aJson, aTab) {
|
||||
|
|
|
@ -11,11 +11,6 @@ Cu.import("resource://gre/modules/devtools/dbg-server.jsm")
|
|||
* Constants
|
||||
*/
|
||||
|
||||
// BrowserUI.update(state) constants. Currently passed in
|
||||
// but update doesn't pay attention to them. Can we remove?
|
||||
const TOOLBARSTATE_LOADING = 1;
|
||||
const TOOLBARSTATE_LOADED = 2;
|
||||
|
||||
// Page for which the start UI is shown
|
||||
const kStartOverlayURI = "about:start";
|
||||
|
||||
|
@ -297,11 +292,19 @@ var BrowserUI = {
|
|||
* Navigation
|
||||
*/
|
||||
|
||||
/* Updates the overall state of the toolbar, but not the URL bar. */
|
||||
update: function(aState) {
|
||||
let uri = this.getDisplayURI(Browser.selectedBrowser);
|
||||
StartUI.update(uri);
|
||||
// BrowserUI update bit flags
|
||||
NO_STARTUI_VISIBILITY: 1, // don't change the start ui visibility
|
||||
|
||||
/*
|
||||
* Updates the overall state of startui visibility and the toolbar, but not
|
||||
* the URL bar.
|
||||
*/
|
||||
update: function(aFlags) {
|
||||
let flags = aFlags || 0;
|
||||
if (!(flags & this.NO_STARTUI_VISIBILITY)) {
|
||||
let uri = this.getDisplayURI(Browser.selectedBrowser);
|
||||
StartUI.update(uri);
|
||||
}
|
||||
this._updateButtons();
|
||||
this._updateToolbar();
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче