mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 470441: Can't switch tabs between website and about:config, r=mfinkle
This commit is contained in:
parent
33e8511b30
commit
5f1bda47c8
@ -352,6 +352,7 @@ WidgetStack.prototype = {
|
||||
_dragState: null,
|
||||
|
||||
_skipViewportUpdates: 0,
|
||||
_forceViewportUpdate: false,
|
||||
|
||||
//
|
||||
// init:
|
||||
@ -734,21 +735,26 @@ WidgetStack.prototype = {
|
||||
},
|
||||
|
||||
beginUpdateBatch: function startUpdate() {
|
||||
if (!this._skipViewportUpdates)
|
||||
if (!this._skipViewportUpdates) {
|
||||
this._startViewportBoundsString = this._viewportBounds.toString();
|
||||
this._forceViewportUpdate = false;
|
||||
}
|
||||
this._skipViewportUpdates++;
|
||||
},
|
||||
|
||||
endUpdateBatch: function endUpdate() {
|
||||
endUpdateBatch: function endUpdate(aForceRedraw) {
|
||||
if (!this._skipViewportUpdates)
|
||||
throw new Error("Unbalanced call to endUpdateBatch");
|
||||
|
||||
this._forceViewportUpdate = this._forceViewportUpdate || aForceRedraw;
|
||||
|
||||
this._skipViewportUpdates--;
|
||||
if (this._skipViewportUpdates)
|
||||
return
|
||||
|
||||
let boundsSizeChanged =
|
||||
this._startViewportBoundsString != this._viewportBounds.toString();
|
||||
this._callViewportUpdateHandler(boundsSizeChanged);
|
||||
this._callViewportUpdateHandler(boundsSizeChanged || this._forceViewportUpdate);
|
||||
},
|
||||
|
||||
//
|
||||
|
@ -354,9 +354,6 @@ var Browser = {
|
||||
let firstTab = this._selectedTab == null;
|
||||
this._selectedTab = tab;
|
||||
|
||||
// reset the viewportBounds to ensure a redraw
|
||||
this._currentViewportBounds = { width: 0, height: 0};
|
||||
|
||||
ws.beginUpdateBatch();
|
||||
this._canvasBrowser.setCurrentBrowser(this.selectedBrowser, firstTab);
|
||||
document.getElementById("tabs").selectedItem = tab.content;
|
||||
@ -380,7 +377,7 @@ var Browser = {
|
||||
event.initEvent("TabSelect", true, false);
|
||||
tab.content.dispatchEvent(event);
|
||||
}
|
||||
ws.endUpdateBatch();
|
||||
ws.endUpdateBatch(true);
|
||||
},
|
||||
|
||||
supportsCommand: function(cmd) {
|
||||
|
Loading…
Reference in New Issue
Block a user