Closed
Bug 595483
Opened 14 years ago
Closed 14 years ago
Port duplicateTabIn introduced in bug 448546
Categories
(SeaMonkey :: Tabbed Browser, defect)
SeaMonkey
Tabbed Browser
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey2.1b1
People
(Reporter: misak.bugzilla, Assigned: philip.chee)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
2.67 KB,
patch
|
neil
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
4.05 KB,
patch
|
Details | Diff | Splinter Review |
bug 448546 introduces duplicateTabIn method, which will be nice to have for API compatibility.
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Comment 1•14 years ago
|
||
Purely for Firefox compatibility (otherwise totally unnecessary)
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #477954 -
Flags: review?(neil)
Attachment #477954 -
Flags: feedback?(misak.bugzilla)
Comment 2•14 years ago
|
||
Comment on attachment 477954 [details] [diff] [review]
Patch v1.0 add Firefox compatible duplicateTabIn()
>+ aTab = aTab ? aTab : getBrowser().selectedTab;
At a quick glance, you could use aTab || getBrowser().selectedTab instead.
>+ var delta = aHistoryIndex == null ? currentIndex :
>+ aHistoryIndex - currentIndex;
Surely if aHistoryIndex is null then delta should be zero?
Assignee | ||
Comment 3•14 years ago
|
||
>>+ var delta = aHistoryIndex == null ? currentIndex :
>>+ aHistoryIndex - currentIndex;
> Surely if aHistoryIndex is null then delta should be zero?
Yeah that's what I assumed at first too, but I couldn't match Firefox observed behaviour that way. Unfortunately I have to be compatible with their brain damaged implementation, so this silly construct.
Reporter | ||
Updated•14 years ago
|
Attachment #477954 -
Flags: feedback?(misak.bugzilla) → feedback+
Assignee | ||
Updated•14 years ago
|
Attachment #477954 -
Attachment is obsolete: true
Attachment #477954 -
Flags: review?(neil)
Assignee | ||
Comment 4•14 years ago
|
||
>>+ aTab = aTab ? aTab : getBrowser().selectedTab;
> At a quick glance, you could use aTab || getBrowser().selectedTab instead.
Fixed.
>>+ var delta = aHistoryIndex == null ? currentIndex :
>>+ aHistoryIndex - currentIndex;
> Surely if aHistoryIndex is null then delta should be zero?
Sigh. Brain fade at 2am. Cut and pasted the wrong block into my active patch.
Fixed.
Attachment #478223 -
Flags: superreview?(neil)
Attachment #478223 -
Flags: review?(neil)
Comment 5•14 years ago
|
||
Comment on attachment 478223 [details] [diff] [review]
Patch 1.1 fix issues.
>+/* Firefox compatibility shim *
>+ * duplicateTabIn duplicates tab in a place specified by the parameter |where|.
[This should have been a doc comment of course. Silly Firefox.]
>+ * "tabfocused" same as "tab" but override any background preferences and
>+ focus the new tab
Nit: missing * on this line.
>+ var currentIndex = aTab.linkedBrowser.sessionHistory.index;
>+ var delta = aHistoryIndex == null ? 0 :
>+ aHistoryIndex - currentIndex;
Nit: fits in 80 characters without wrapping.
[duplicateTabIn(null, where) would have been nice, but not required for r+]
Attachment #478223 -
Flags: superreview?(neil)
Attachment #478223 -
Flags: superreview+
Attachment #478223 -
Flags: review?(neil)
Attachment #478223 -
Flags: review+
Comment 6•14 years ago
|
||
(In reply to comment #3)
> >>+ var delta = aHistoryIndex == null ? currentIndex :
> >>+ aHistoryIndex - currentIndex;
> > Surely if aHistoryIndex is null then delta should be zero?
>
> Yeah that's what I assumed at first too, but I couldn't match Firefox observed
> behaviour that way. Unfortunately I have to be compatible with their brain
> damaged implementation, so this silly construct.
But you do realize that you can file bugs on Firefox code, don't you?
Assignee | ||
Comment 7•14 years ago
|
||
>>+ * "tabfocused" same as "tab" but override any background preferences and
>>+ focus the new tab
> Nit: missing * on this line.
Fixed.
>>+ var currentIndex = aTab.linkedBrowser.sessionHistory.index;
>>+ var delta = aHistoryIndex == null ? 0 :
>>+ aHistoryIndex - currentIndex;
> Nit: fits in 80 characters without wrapping.
Fixed.
> [duplicateTabIn(null, where) would have been nice, but not required for r+]
Fixed using:
+ aTab = aTab || getBrowser().selectedTab;
> Dão Gottwald 2010-09-24 08:09:24 PDT
>
> (In reply to comment #3)
>> behaviour that way. Unfortunately I have to be compatible with their brain
>> damaged implementation, so this silly construct.
Oops. Apologies for this rude comment.
> But you do realize that you can file bugs on Firefox code, don't you?
I think I've done that before, but not recently.
Assignee | ||
Comment 8•14 years ago
|
||
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/ae798bbc3965
Also reapplied the patch from Bug 593683 which I accidentally clobbered.
http://hg.mozilla.org/comm-central/rev/4d36594ea0e8
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Target Milestone: --- → seamonkey2.1b1
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•