Bug 679853 - switching from private browsing does not show panorama if it was open before; r=dietrich

This commit is contained in:
Tim Taubert 2011-08-24 13:38:17 +02:00
parent 3f94e66677
commit a7333a73b1
3 changed files with 39 additions and 4 deletions

View File

@ -713,7 +713,6 @@ let UI = {
if (data == "enter" || data == "exit") {
hideSearch();
self._privateBrowsing.transitionMode = data;
self.storageBusy();
}
} else if (topic == "private-browsing-transition-complete") {
// We use .transitionMode here, as aData is empty.
@ -722,7 +721,6 @@ let UI = {
self.showTabView(false);
self._privateBrowsing.transitionMode = "";
self.storageReady();
}
}
@ -869,8 +867,12 @@ let UI = {
this._currentTab = tab;
if (this.isTabViewVisible()) {
if (!this.restoredClosedTab && this._lastOpenedTab == tab &&
tab._tabViewTabItem) {
// We want to zoom in if:
// 1) we didn't just restore a tab via Ctrl+Shift+T
// 2) we're not in the middle of switching from/to private browsing
// 3) the currently selected tab is the last created tab and has a tabItem
if (!this.restoredClosedTab && !this._privateBrowsing.transitionMode &&
this._lastOpenedTab == tab && tab._tabViewTabItem) {
tab._tabViewTabItem.zoomIn(true);
this._lastOpenedTab = null;
return;

View File

@ -155,6 +155,7 @@ _BROWSER_FILES = \
browser_tabview_bug669694.js \
browser_tabview_bug673196.js \
browser_tabview_bug673729.js \
browser_tabview_bug679853.js \
browser_tabview_click_group.js \
browser_tabview_dragdrop.js \
browser_tabview_exit_button.js \

View File

@ -0,0 +1,32 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
waitForExplicitFinish();
// clean up after ourselves
registerCleanupFunction(function () {
while (gBrowser.tabs.length > 1)
gBrowser.removeTab(gBrowser.tabs[1]);
hideTabView();
});
// select the new tab
gBrowser.selectedTab = gBrowser.addTab();
showTabView(function () {
// enter private browsing mode
togglePrivateBrowsing(function () {
ok(!TabView.isVisible(), "tabview is hidden");
showTabView(function () {
// leave private browsing mode
togglePrivateBrowsing(function () {
ok(TabView.isVisible(), "tabview is visible");
hideTabView(finish);
});
});
});
});
}