Closed
Bug 320660
Opened 20 years ago
Closed 20 years ago
When opening multiple tabs, we always focus the first new one, ignoring the pref
Categories
(Camino Graveyard :: Tabbed Browsing, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino1.0
People
(Reporter: hwaara, Assigned: hwaara)
References
Details
(Keywords: fixed1.8.0.2, fixed1.8.1, regression, Whiteboard: [camino-1.0])
Attachments
(1 file, 3 obsolete files)
3.19 KB,
patch
|
stuart.morgan+bugzilla
:
review+
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
from bug 228840: "Currently, when command-clicking a tab group and prefs set to open in new tabs, the new tabs are *always* focused, no matter what the background pref."
Investigating, it's a regression from bug 294019.
When opening multiple URLs in openURLs:, we always select the first of those URLs, even if the user cmd-clicked or middle-clicked (to append new tabs)
Summary: When opening multiple tabs, we always focus the first new one, ignoring the oref → When opening multiple tabs, we always focus the first new one, ignoring the pref
Assignee | ||
Comment 1•20 years ago
|
||
Ok, so if I've understood the earlier bug correctly we need to focus the first new tab if we replace all tabs.
However, if we just append them, we ought to follow the pref, so in that case the code shouldn't apply.
This patch just makes us check whether we're replacing all tabs, or appending them - and then focusing only in the first case.
Attachment #206185 -
Flags: superreview?(sfraser_bugs)
Attachment #206185 -
Flags: review?(nick.kreeger)
Assignee | ||
Comment 2•20 years ago
|
||
*** Bug 318626 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 3•20 years ago
|
||
I don't know if the reviewers I chose for this patch are OK, so if anyone feels like it feel free to have a look.
Comment 4•20 years ago
|
||
Comment on attachment 206185 [details] [diff] [review]
Proposed fix
> This patch just makes us check whether we're replacing all tabs, or appending
> them - and then focusing only in the first case.
That's not the correct behavior. There is a pref for whether or not tabs are loaded in the background or the foreground, which needs to be respected.
It's probably also a bit more complicated than that; you'll have to look at who calls into this function, and what the expected behavior would be, since some might reasonably override the pref (the open panel, for example).
Attachment #206185 -
Flags: superreview?(sfraser_bugs)
Attachment #206185 -
Flags: review?(nick.kreeger)
Attachment #206185 -
Flags: review-
Comment 5•20 years ago
|
||
Ew. This is a tangent, but eAppendFromCurrentTab is horribly named; while you are touching this function it would be great if you could rename it to eReplaceFromCurrentTab, since that's what it actually does.
Assignee | ||
Comment 6•20 years ago
|
||
Maybe I was unclear, but this patch fixes the bug that prevents that very pref from working.
Assignee | ||
Comment 7•20 years ago
|
||
Actually, you were right. My previous patch fixed a regression (that we were _always_ focusing new tabs, no matter if they were only appended). This new patch also makes us respect the focus-pref.
Attachment #206185 -
Attachment is obsolete: true
Attachment #206433 -
Flags: superreview?
Attachment #206433 -
Flags: review?
Comment 8•20 years ago
|
||
Isn't that patch missing a header change?
Comment 9•20 years ago
|
||
Comment on attachment 206433 [details] [diff] [review]
Patch 2
Yes, I was just in the midst of reviewing/testing, and it's missing the enum declaration change in BrowserWindowController.h.
Also:
+ if ((tabPolicy == eReplaceTabs) || !loadInBackground)
should be
if (!((tabPolicy == eAppendTabs) && loadInBackground))
so it only affects eAppendTabs. I'm about to test with those changes though
Attachment #206433 -
Flags: superreview?
Attachment #206433 -
Flags: review?
Attachment #206433 -
Flags: review-
Comment 10•20 years ago
|
||
Looks good other than that, so r=me with the two changes above.
Assignee | ||
Comment 11•20 years ago
|
||
Been testing this patch in lots of cases and it works well. Made the changes suggested by Stuart Morgan.
Attachment #206433 -
Attachment is obsolete: true
Attachment #206873 -
Flags: superreview?(sfraser_bugs)
Attachment #206873 -
Flags: review+
Comment 12•20 years ago
|
||
Comment on attachment 206873 [details] [diff] [review]
Patch v3
Lets have Stuart actually set the flags please !
Attachment #206873 -
Flags: review+ → review?(stuart.morgan)
Assignee | ||
Comment 13•20 years ago
|
||
(In reply to comment #12)
> (From update of attachment 206873 [details] [diff] [review] [edit])
> Lets have Stuart actually set the flags please !
>
I made the changes he proposed, and he wrote "r=me with the two changes above."?
Comment 14•20 years ago
|
||
Comment on attachment 206873 [details] [diff] [review]
Patch v3
Now you've left this change out:
- [browserController openURLArray:urlStringsArray tabOpenPolicy:eAppendFromCurrentTab allowPopups:YES];
+ [browserController openURLArray:urlStringsArray tabOpenPolicy:eReplaceFromCurrentTab allowPopups:YES];
so once again the patch won't compile. You need to make sure you are generating patches from BrowserWindowController.mm, BrowserWindowController.h, and MainController.mm.
Also, don't add the whitespace at the end of the BWC changes.
(This is why it's best not to do an r+ in someone else's name, by the way--patchs don't always get spun the way one intends.)
Attachment #206873 -
Flags: superreview?(sfraser_bugs)
Attachment #206873 -
Flags: review?(stuart.morgan)
Attachment #206873 -
Flags: review-
Assignee | ||
Comment 15•20 years ago
|
||
Sorry, I have so many changes in my tree it's hard to keep track of them when diffing.
Attachment #206873 -
Attachment is obsolete: true
Attachment #206909 -
Flags: superreview?(sfraser_bugs)
Attachment #206909 -
Flags: review?(stuart.morgan)
Assignee | ||
Comment 16•20 years ago
|
||
Comment on attachment 206909 [details] [diff] [review]
Patch again
I'll also remove that stale whitespace.
Comment 17•20 years ago
|
||
Comment on attachment 206909 [details] [diff] [review]
Patch again
r=me
Attachment #206909 -
Flags: review?(stuart.morgan) → review+
Since this is a regression and has an r+ patch, putting on the 1.0 list.
Assignee | ||
Comment 19•20 years ago
|
||
Smfr, wanna have a look at this patch? It's got r+, and fixes a regression. Maybe we could even get it into 1.0 ?
Comment 20•20 years ago
|
||
This has a reasonable-looking patch and is a regression. 1.0?
Updated•20 years ago
|
Attachment #206909 -
Flags: superreview?(sfraser_bugs) → superreview+
Comment 21•20 years ago
|
||
Checked in everywhere, sans the bogus and obsolete NSLocalizedString diff. Thanks, Håkan!
Status: NEW → RESOLVED
Closed: 20 years ago
Flags: camino1.0? → camino1.0+
Keywords: fixed1.8.0.2,
fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [camino-1.0]
Assignee | ||
Comment 22•20 years ago
|
||
Thanks for checking in for me - I'm currently busy with non-Mozilla projects :)
You need to log in
before you can comment on or make changes to this bug.
Description
•