mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895567 - Fix for start page flashing into view during initial load of a page. r=sfoster
This commit is contained in:
parent
c16e244bd6
commit
309bb1adbb
@ -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();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user