Closed
Bug 701377
Opened 13 years ago
Closed 13 years ago
setTabState() always unhides the tab
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 14
People
(Reporter: ttaubert, Assigned: ttaubert)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
zpao
:
review+
|
Details | Diff | Splinter Review |
When I have a hidden blank tab (in another group for example) and call ss.setTabState(blankTab) I expect it not to be restored but be ready for restoration when the corresponding group gets shown again. That's because of setTabState() calls:
> this.restoreHistoryPrecursor(window, [aTab], [tabState], 0, 0, 0);
And restoreHistoryPrecursor contains these lines:
> let unhiddenTabs = aTabData.filter(function (aData) !aData.hidden).length;
>
> // if all tabs to be restored are hidden, make the first one visible
> if (unhiddenTabs == 0) {
> aTabData[0].hidden = false;
> } else if (aTabs.length > 1) {
> ...
> }
This results in very strange results (especially in combination with Panorama) as the tab gets shown, loads and is hidden again.
Assignee | ||
Comment 1•13 years ago
|
||
This patch moves the code that unhides the first tab (to have at least one shown tab) to restoreWindow().
Attachment #573511 -
Flags: review?(paul)
Comment 2•13 years ago
|
||
Comment on attachment 573511 [details] [diff] [review]
patch v1
Review of attachment 573511 [details] [diff] [review]:
-----------------------------------------------------------------
Seems fine by me, just add a test before landing. Thanks Tim!
Attachment #573511 -
Flags: review?(paul) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Added a sessionstore test. Alas, there are intermittent try failures which need to be investigated:
browser_tabview_bug627288.js times out because the tab passed to ss.restoreTab() seems to be removed from its window. I think there's some issue with setTimeout() and the tab being removed in the meantime...
Attachment #573511 -
Attachment is obsolete: true
Comment 4•13 years ago
|
||
I know you're a busy man Tim, but any update on those oranges?
Assignee | ||
Comment 5•13 years ago
|
||
It's been in my todo list for weeks and I've always wanted to look at this again. Hope I can find the time soon. Don't hesitate to steal this in the meantime if anyone feels like it :)
Assignee | ||
Comment 6•13 years ago
|
||
Comment on attachment 580303 [details] [diff] [review]
patch v2 (with test)
So I pushed it to try again and had one strange intermittent error that didn't seem to recur:
https://tbpl.mozilla.org/?tree=Try&rev=ad05cc963b54
A second try push with some debug output didn't show it, too:
https://tbpl.mozilla.org/?tree=Try&rev=8ebc88495609
Attachment #580303 -
Flags: review?(paul)
Updated•13 years ago
|
Attachment #580303 -
Flags: review?(paul) → review+
Assignee | ||
Comment 7•13 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 14
Assignee | ||
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
You need to log in
before you can comment on or make changes to this bug.
Description
•