Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Port Bug 461634 [new API: allow to delete a single closed tab] to SeaMonkey

RESOLVED FIXED in seamonkey2.1a1

Status

SeaMonkey
Session Restore
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: Misak Khachatryan, Assigned: Misak Khachatryan)

Tracking

Trunk
seamonkey2.1a1
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

10.03 KB, patch
Misak Khachatryan
: review+
Misak Khachatryan
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
From parent bug:

Extensions desiring to selectively forget information about closed tabs/windows
have to be quite inventive. What about a new API:

void forgetClosedTab(in nsIDOMWindow aWindow, in unsigned long aIndex);
(Assignee)

Comment 1

8 years ago
Created attachment 409308 [details] [diff] [review]
patch

Patch with test. I disabled some of tests related to our specific implementation of undCloseTab and bug 478707. Rest of tests passing.
Attachment #409308 - Flags: superreview?(neil)
Attachment #409308 - Flags: review?(neil)

Comment 2

8 years ago
Comment on attachment 409308 [details] [diff] [review]
patch

I don't think this relates to our version of undoCloseTab.
Attachment #409308 - Flags: superreview?(neil)
Attachment #409308 - Flags: superreview-
Attachment #409308 - Flags: review?(neil)
(Assignee)

Comment 3

8 years ago
Sorry, i just mean that because of our specific implementation of undoCloseTab, bug 478707 exist, and we have little mess with getClosedTabData. We don't restore closed tab data or save it when setWindowState called. That's why disabled test fail.

Comment 4

8 years ago
Right, but this API is to forget about the closed tab of an open window, and we currently track that on the tabbrowser instead. At least from our point of view, it would make more sense to provide the API on the tabbrowser too, and it would simply destroy the saved browser in much the same way as the code at the end of removeTab destroys the oldest saved browser if it overflows the undo stack.
(Assignee)

Updated

8 years ago
Depends on: 478707
(Assignee)

Comment 5

8 years ago
Created attachment 409676 [details] [diff] [review]
suggestion implemented.

Done as Neil suggested. Also i replaced gBrowser by getBrowser(). Test is almost useless now, it only check for wrong parameters, until bug 478707 will be fixed.
Attachment #409308 - Attachment is obsolete: true
Attachment #409676 - Flags: superreview?(neil)
Attachment #409676 - Flags: review?(neil)

Comment 6

8 years ago
Comment on attachment 409676 [details] [diff] [review]
suggestion implemented.

>+      <method name="forgetSavedBrowser">
I wonder whether Firefox would be interested in an API on tabbrowser.

>+        <parameter name="aIndex"/>
Need to validate aIndex here, in case anyone calls it directly.

>+    aIndex = aIndex || 0;
Don't need this, XPConnect already defaults to 0. (And you'll be validating in the tabbrowser anyway, right?)

>+    ss.setWindowState(newWin, JSON.stringify(test_state), true);
Maybe we can add and close tabs directly, thus simulating closed tabs?
(Assignee)

Comment 7

8 years ago
Created attachment 409893 [details] [diff] [review]
comments fixed.

Well, all done as suggested. Tests all enabled and passing.
Attachment #409676 - Attachment is obsolete: true
Attachment #409893 - Flags: superreview?(neil)
Attachment #409893 - Flags: review?(neil)
Attachment #409676 - Flags: superreview?(neil)
Attachment #409676 - Flags: review?(neil)

Updated

8 years ago
Attachment #409893 - Flags: superreview?(neil)
Attachment #409893 - Flags: superreview+
Attachment #409893 - Flags: review?(neil)
Attachment #409893 - Flags: review+

Comment 8

8 years ago
Comment on attachment 409893 [details] [diff] [review]
comments fixed.

Warning: 9 lines add whitespace errors.

>diff --git a/suite/common/src/nsSessionStore.js b/suite/common/src/nsSessionStore.js
>--- a/suite/common/src/nsSessionStore.js
>+++ b/suite/common/src/nsSessionStore.js
>@@ -23,6 +23,7 @@
>  *   Ehsan Akhgari <ehsan.akhgari@gmail.com>
>  *   Paul O’Shannessy <paul@oshannessy.com>
>  *   Nils Maier <maierman@web.de>
>+ *   Michael Kraft <morac99-firefox@yahoo.com>
In this file, the changes are all yours :-)

>+	"... and tabs not specifically forgetten weren't.");
Nit: forgotten
(Assignee)

Comment 9

8 years ago
Created attachment 410720 [details] [diff] [review]
for checkin
[Checkin: Comment 10]

patch for checkin, carrying forward r+ and sr+ from Neil.
Attachment #409893 - Attachment is obsolete: true
Attachment #410720 - Flags: superreview+
Attachment #410720 - Flags: review+
(Assignee)

Updated

8 years ago
Keywords: checkin-needed
Comment on attachment 410720 [details] [diff] [review]
for checkin
[Checkin: Comment 10]


http://hg.mozilla.org/comm-central/rev/401efe3c7c6a
Attachment #410720 - Attachment description: for checkin → for checkin [Checkin: Comment 10]
Keywords: checkin-needed
Target Milestone: --- → seamonkey2.1a1
Flags: in-testsuite+
(Assignee)

Comment 11

8 years ago
I guess we can close this bug.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Updated

7 years ago
Blocks: 567531
You need to log in before you can comment on or make changes to this bug.