Closed
Bug 636110
Opened 14 years ago
Closed 14 years ago
Update signature of duplicateTabIn() stub to match match Firefox 4.0.
Categories
(SeaMonkey :: Tabbed Browser, defect)
SeaMonkey
Tabbed Browser
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey2.1b3
People
(Reporter: philip.chee, Assigned: philip.chee)
References
Details
(Keywords: regression)
Attachments
(1 file)
2.75 KB,
patch
|
neil
:
review+
misak.bugzilla
:
feedback+
|
Details | Diff | Splinter Review |
duplicateTabIn() is the Firefox equivalent of our OpenSessionHistoryIn(). After I implemented a stub duplicateTabIn() for extension compatibility, Dao decided that our API was saner. This bug just updates our stub.
Assignee | ||
Updated•14 years ago
|
Assignee: philip.chee → nobody
Component: General → Tabbed Browser
QA Contact: general → tabbed-browser
Assignee | ||
Comment 1•14 years ago
|
||
> duplicateTab: function sss_duplicateTab(aWindow, aTab, aDelta, aRelated) {
> if (!aTab.ownerDocument || !aTab.ownerDocument.defaultView.__SSi ||
> aWindow && !aWindow.getBrowser)
> throw (Components.returnCode = Components.results.NS_ERROR_INVALID_ARG);
>
> var tabState = this._collectTabData(aTab, true);
> var sourceWindow = aTab.ownerDocument.defaultView;
> this._updateTextAndScrollDataForTab(sourceWindow, aTab.linkedBrowser, tabState, true);
> - this._sendWindowStateEvent(aWindow, "Busy");
> tabState.index += aDelta;
> + tabState.index = Math.max(1, Math.min(tabState.index, tabState.entries.length));
>
> if (aWindow) {
> + this._sendWindowStateEvent(aWindow, "Busy");
_sendWindowStateEvent falls over when aWindow is null. Introduced in:
http://hg.mozilla.org/comm-central/rev/c18dddea67de
Bug 633722 - Port Bug 615394 [Session Restore should notify when it is beginning and ending a restore]
Oops.
Assignee: nobody → philip.chee
Attachment #514710 -
Flags: review?(neil)
Attachment #514710 -
Flags: feedback?(misak.bugzilla)
Comment 2•14 years ago
|
||
Comment on attachment 514710 [details] [diff] [review]
Patch v1.0 inc SessionRestore fix.
Perhaps we should modify it to use current window if aWindow is null ...
Attachment #514710 -
Flags: feedback?(misak.bugzilla) → feedback+
Comment 3•14 years ago
|
||
(In reply to comment #2)
> Perhaps we should modify it to use current window if aWindow is null ...
No, because in that case we're creating a new window, and therefore restoreWindow will call _sendWindowStateEvent on the new window for us, right?
Incidentally I notice that undo close tab calls _sendWindowStateEvent even when using the tabbrowser to restore the tab.
Updated•14 years ago
|
Attachment #514710 -
Flags: review?(neil) → review+
Assignee | ||
Comment 4•14 years ago
|
||
> > Perhaps we should modify it to use current window if aWindow is null ...
> No, because in that case we're creating a new window, and therefore
> restoreWindow will call _sendWindowStateEvent on the new window for us, right?
Also my reading of the code indicates that there should be a matching _sendWindowStateEvent(aWindow, "Ready") on the same window so it's no use sending only half of the notifications.
Assignee | ||
Comment 5•14 years ago
|
||
Pushed to comm-central.
http://hg.mozilla.org/comm-central/rev/aa25d31c8221
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: regression
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.1b3
Comment 6•14 years ago
|
||
Comment on attachment 514710 [details] [diff] [review]
Patch v1.0 inc SessionRestore fix.
>- OpenSessionHistoryIn(aWhere, delta, aTab)
>+ OpenSessionHistoryIn(aWhere, aDelta, aTab)
[Bah, I failed to notice the missing semicolon]
Assignee | ||
Comment 7•14 years ago
|
||
> [Bah, I failed to notice the missing semicolon]
Added semicolon:
http://hg.mozilla.org/comm-central/rev/8310d0fd89a6
You need to log in
before you can comment on or make changes to this bug.
Description
•