Last Comment Bug 679853 - switching from private browsing does not show panorama if it was open before
: switching from private browsing does not show panorama if it was open before
Status: RESOLVED FIXED
:
Product: Firefox Graveyard
Classification: Graveyard
Component: Panorama (show other bugs)
: Trunk
: All All
: -- normal
: Firefox 9
Assigned To: Tim Taubert [:ttaubert]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-17 13:26 PDT by Tim Taubert [:ttaubert]
Modified: 2016-04-12 14:00 PDT (History)
1 user (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
[checked-in] patch v1 (4.42 KB, patch)
2011-08-17 13:36 PDT, Tim Taubert [:ttaubert]
dietrich: review+
raymond: feedback+
Details | Diff | Review

Description Tim Taubert [:ttaubert] 2011-08-17 13:26:42 PDT
STR:

1) have two tabs
2) select the second tab
3) go into panorama
4) enter private browsing
5) go into panorama
6) leave private browsing

Expected result: Panorama is shown.
Actual result: Panorama is not shown.

This is because the PB service sets an intermediate browser state before switching to PB mode completely (see bug 476463). This issues a TabSelect event which zooms out of Panorama (possibly a regression since bug 633190).
Comment 1 Tim Taubert [:ttaubert] 2011-08-17 13:36:54 PDT
Created attachment 553886 [details] [diff] [review]
[checked-in] patch v1
Comment 2 Tim Taubert [:ttaubert] 2011-08-17 13:45:24 PDT
Comment on attachment 553886 [details] [diff] [review]
[checked-in] patch v1

Review of attachment 553886 [details] [diff] [review]:
-----------------------------------------------------------------

Is this a good way to tell a reviewer what my patch does? Let's try...

::: browser/base/content/tabview/ui.js
@@ -718,5 @@
>        } else if (topic == "private-browsing-change-granted") {
>          if (data == "enter" || data == "exit") {
>            hideSearch();
>            self._privateBrowsing.transitionMode = data;
> -          self.storageBusy();

This can be removed because UI._storageBusy is only a flag, not a counter anymore (since bug 662812). The SSWindowStateReady/Busy events will be fired by the setBrowserState() calls the private browsing service issues.

@@ -732,5 @@
>              self._privateBrowsing.wasInTabView)
>            self.showTabView(false);
>  
>          self._privateBrowsing.transitionMode = "";
> -        self.storageReady();

(see above)

@@ +886,5 @@
>      this._currentTab = tab;
>  
>      if (this.isTabViewVisible()) {
> +      if (!this.restoredClosedTab && !this._privateBrowsing.transitionMode &&
> +          this._lastOpenedTab == tab && tab._tabViewTabItem) {

If we're in the middle of a private browsing mode transition we don't want to zoom into a tab.
Comment 3 Raymond Lee [:raymondlee] 2011-08-17 18:53:32 PDT
Comment on attachment 553886 [details] [diff] [review]
[checked-in] patch v1

Seems to be a good way to explain what a patch does.
Comment 4 Dietrich Ayala (:dietrich) 2011-08-22 14:25:12 PDT
Comment on attachment 553886 [details] [diff] [review]
[checked-in] patch v1

Review of attachment 553886 [details] [diff] [review]:
-----------------------------------------------------------------

thanks for the explanations, it *definitely* helps. r=me.

::: browser/base/content/tabview/ui.js
@@ +886,5 @@
>      this._currentTab = tab;
>  
>      if (this.isTabViewVisible()) {
> +      if (!this.restoredClosedTab && !this._privateBrowsing.transitionMode &&
> +          this._lastOpenedTab == tab && tab._tabViewTabItem) {

there are a bunch of other conditions in there - some are self-documenting and some aren't. can you add a comment here that clearly explains the conditions for zoom in to occur?
Comment 5 Tim Taubert [:ttaubert] 2011-08-24 04:46:46 PDT
http://hg.mozilla.org/integration/fx-team/rev/e138c3a22a65
Comment 6 Rob Campbell [:rc] (:robcee) 2011-08-25 11:48:16 PDT
Comment on attachment 553886 [details] [diff] [review]
[checked-in] patch v1

http://hg.mozilla.org/mozilla-central/rev/e138c3a22a65

Note You need to log in before you can comment on or make changes to this bug.