mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 979031 - [Australis] Don't animate the opening of the about:customizing tab. r=dao.
This commit is contained in:
parent
e8ec336d12
commit
feae809bc3
@ -6856,9 +6856,14 @@ let gRemoteTabsUI = {
|
||||
* @param aOpenNew
|
||||
* True to open a new tab and switch to it, if no existing tab is found.
|
||||
* If no suitable window is found, a new one will be opened.
|
||||
* @param aOpenParams
|
||||
* If switching to this URI results in us opening a tab, aOpenParams
|
||||
* will be the parameter object that gets passed to openUILinkIn. Please
|
||||
* see the documentation for openUILinkIn to see what parameters can be
|
||||
* passed via this object.
|
||||
* @return True if an existing tab was found, false otherwise
|
||||
*/
|
||||
function switchToTabHavingURI(aURI, aOpenNew) {
|
||||
function switchToTabHavingURI(aURI, aOpenNew, aOpenParams) {
|
||||
// This will switch to the tab in aWindow having aURI, if present.
|
||||
function switchIfURIInWindow(aWindow) {
|
||||
// Only switch to the tab if neither the source and desination window are
|
||||
@ -6906,9 +6911,9 @@ function switchToTabHavingURI(aURI, aOpenNew) {
|
||||
// No opened tab has that url.
|
||||
if (aOpenNew) {
|
||||
if (isBrowserWindow && isTabEmpty(gBrowser.selectedTab))
|
||||
gBrowser.selectedBrowser.loadURI(aURI.spec);
|
||||
openUILinkIn(aURI.spec, "current", aOpenParams);
|
||||
else
|
||||
openUILinkIn(aURI.spec, "tab");
|
||||
openUILinkIn(aURI.spec, "tab", aOpenParams);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -1260,6 +1260,7 @@
|
||||
var aFromExternal;
|
||||
var aRelatedToCurrent;
|
||||
var aDisableMCB;
|
||||
var aSkipAnimation;
|
||||
if (arguments.length == 2 &&
|
||||
typeof arguments[1] == "object" &&
|
||||
!(arguments[1] instanceof Ci.nsIURI)) {
|
||||
@ -1272,6 +1273,7 @@
|
||||
aFromExternal = params.fromExternal;
|
||||
aRelatedToCurrent = params.relatedToCurrent;
|
||||
aDisableMCB = params.disableMCB;
|
||||
aSkipAnimation = params.skipAnimation;
|
||||
}
|
||||
|
||||
var bgLoad = (aLoadInBackground != null) ? aLoadInBackground :
|
||||
@ -1285,6 +1287,7 @@
|
||||
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
||||
fromExternal: aFromExternal,
|
||||
relatedToCurrent: aRelatedToCurrent,
|
||||
skipAnimation: aSkipAnimation,
|
||||
disableMCB: aDisableMCB});
|
||||
if (!bgLoad)
|
||||
this.selectedTab = tab;
|
||||
|
@ -184,6 +184,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
|
||||
* postData (nsIInputStream)
|
||||
* referrerURI (nsIURI)
|
||||
* relatedToCurrent (boolean)
|
||||
* skipTabAnimation (boolean)
|
||||
*/
|
||||
function openUILinkIn(url, where, aAllowThirdPartyFixup, aPostData, aReferrerURI) {
|
||||
var params;
|
||||
@ -218,6 +219,7 @@ function openLinkIn(url, where, params) {
|
||||
var aDisallowInheritPrincipal = params.disallowInheritPrincipal;
|
||||
var aInitiatingDoc = params.initiatingDoc;
|
||||
var aIsPrivate = params.private;
|
||||
var aSkipTabAnimation = params.skipTabAnimation;
|
||||
|
||||
if (where == "save") {
|
||||
if (!aInitiatingDoc) {
|
||||
@ -320,6 +322,7 @@ function openLinkIn(url, where, params) {
|
||||
inBackground: loadInBackground,
|
||||
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
||||
relatedToCurrent: aRelatedToCurrent,
|
||||
skipAnimation: aSkipTabAnimation,
|
||||
disableMCB: aDisableMCB});
|
||||
break;
|
||||
}
|
||||
|
@ -127,7 +127,9 @@ CustomizeMode.prototype = {
|
||||
// We don't need to switch to kAboutURI, or open a new tab at
|
||||
// kAboutURI if we're already on it.
|
||||
if (this.browser.selectedBrowser.currentURI.spec != kAboutURI) {
|
||||
this.window.switchToTabHavingURI(kAboutURI, true);
|
||||
this.window.switchToTabHavingURI(kAboutURI, true, {
|
||||
skipTabAnimation: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user