mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 721032 - Make thumbnails in about:home and tab menu identical r=mfinkle
This commit is contained in:
parent
81cf25f4e0
commit
d04b34db75
@ -140,6 +140,7 @@ public class TabsTray extends Activity implements GeckoApp.OnTabsChangedListener
|
||||
void finishActivity() {
|
||||
finish();
|
||||
overridePendingTransition(0, R.anim.shrink_fade_out);
|
||||
GeckoAppShell.sendEventToGecko(new GeckoEvent("Tab:Screenshot:Cancel",""));
|
||||
}
|
||||
|
||||
// Adapter to bind tabs into a list
|
||||
|
@ -504,7 +504,31 @@ var BrowserApp = {
|
||||
this._tabs.splice(this._tabs.indexOf(aTab), 1);
|
||||
},
|
||||
|
||||
screenshotQueue: null,
|
||||
|
||||
screenshotTab: function screenshotTab(aData) {
|
||||
if (this.screenshotQueue == null) {
|
||||
this.screenShotQueue = [];
|
||||
this.doScreenshotTab(aData);
|
||||
} else {
|
||||
this.screenshotQueue.push(aData);
|
||||
}
|
||||
},
|
||||
|
||||
doNextScreenshot: function() {
|
||||
if (this.screenshotQueue == null || this.screenshotQueue.length == 0) {
|
||||
this.screenshotQueue = null;
|
||||
return;
|
||||
}
|
||||
let data = this.screenshotQueue.pop();
|
||||
if (data == null) {
|
||||
this.screenshotQueue = null;
|
||||
return;
|
||||
}
|
||||
this.doScreenshotTab(data);
|
||||
},
|
||||
|
||||
doScreenshotTab: function doScreenshotTab(aData) {
|
||||
let json = JSON.parse(aData);
|
||||
let tab = this.getTabForId(parseInt(json.tabID));
|
||||
let width = parseInt(json.width);
|
||||
@ -899,6 +923,8 @@ var BrowserApp = {
|
||||
this._handleTabClosed(this.getTabForId(parseInt(aData)));
|
||||
} else if (aTopic == "Tab:Screenshot") {
|
||||
this.screenshotTab(aData);
|
||||
} else if (aTopic == "Tab:Screenshot:Cancel") {
|
||||
this.screenshotQueue = null;
|
||||
} else if (aTopic == "Browser:Quit") {
|
||||
this.quit();
|
||||
} else if (aTopic == "SaveAs:PDF") {
|
||||
@ -1557,6 +1583,9 @@ Tab.prototype = {
|
||||
}
|
||||
};
|
||||
sendMessageToJava(message);
|
||||
Services.tm.mainThread.dispatch(function() {
|
||||
BrowserApp.doNextScreenshot()
|
||||
}, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
},
|
||||
|
||||
updateTransform: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user