зеркало из https://github.com/mozilla/pjs.git
fix missed selectors and problem where loading tabs in background would
mess up jumpback (bugs 342538 and 342526)
This commit is contained in:
Родитель
cdb0825831
Коммит
95c4360c15
|
@ -556,7 +556,7 @@ const int kReuseWindowOnAE = 2;
|
||||||
if (openInNewWindow)
|
if (openInNewWindow)
|
||||||
[self openBrowserWindowWithURL:[(Bookmark *)item url] andReferrer:nil behind:behindWindow allowPopups:YES];
|
[self openBrowserWindowWithURL:[(Bookmark *)item url] andReferrer:nil behind:behindWindow allowPopups:YES];
|
||||||
else if (openInNewTab)
|
else if (openInNewTab)
|
||||||
[browserWindowController openNewTabWithURL:[(Bookmark *)item url] referrer:nil loadInBackground:newTabInBackground allowPopups:YES];
|
[browserWindowController openNewTabWithURL:[(Bookmark *)item url] referrer:nil loadInBackground:newTabInBackground allowPopups:YES setJumpback:NO];
|
||||||
else
|
else
|
||||||
[browserWindowController loadURL:[(Bookmark *)item url] referrer:nil activate:YES allowPopups:YES];
|
[browserWindowController loadURL:[(Bookmark *)item url] referrer:nil activate:YES allowPopups:YES];
|
||||||
}
|
}
|
||||||
|
@ -1107,7 +1107,7 @@ Otherwise, we return the URL we originally got. Right now this supports .url,
|
||||||
if (tabOrWindowIsAvailable || reuseWindow == kReuseWindowOnAE)
|
if (tabOrWindowIsAvailable || reuseWindow == kReuseWindowOnAE)
|
||||||
[controller loadURL:inURLString referrer:nil activate:YES allowPopups:NO];
|
[controller loadURL:inURLString referrer:nil activate:YES allowPopups:NO];
|
||||||
else if (reuseWindow == kOpenNewTabOnAE)
|
else if (reuseWindow == kOpenNewTabOnAE)
|
||||||
[controller openNewTabWithURL:inURLString referrer:aReferrer loadInBackground:loadInBackground allowPopups:NO];
|
[controller openNewTabWithURL:inURLString referrer:aReferrer loadInBackground:loadInBackground allowPopups:NO setJumpback:NO];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// note that we're opening a new window here
|
// note that we're opening a new window here
|
||||||
|
|
|
@ -471,7 +471,7 @@ NSString* const kTabBarBackgroundDoubleClickedNotification = @"kTabBarBackground
|
||||||
|
|
||||||
-(void)addTabForURL:(NSString*)aURL referrer:(NSString*)aReferrer
|
-(void)addTabForURL:(NSString*)aURL referrer:(NSString*)aReferrer
|
||||||
{
|
{
|
||||||
[[[self window] windowController] openNewTabWithURL:aURL referrer:aReferrer loadInBackground:YES allowPopups:NO];
|
[[[self window] windowController] openNewTabWithURL:aURL referrer:aReferrer loadInBackground:YES allowPopups:NO setJumpback:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
@ -492,6 +492,7 @@ NSString* const kTabBarBackgroundDoubleClickedNotification = @"kTabBarBackground
|
||||||
|
|
||||||
- (void)setJumpbackTab:(BrowserTabViewItem*)inTab
|
- (void)setJumpbackTab:(BrowserTabViewItem*)inTab
|
||||||
{
|
{
|
||||||
|
NSLog(@"setting jumpback to %d", inTab);
|
||||||
mJumpbackTab = inTab;
|
mJumpbackTab = inTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2992,7 +2992,7 @@ enum BWCOpenDest {
|
||||||
// jump back to if this new one is closed w/out switching to any other tabs.
|
// jump back to if this new one is closed w/out switching to any other tabs.
|
||||||
// This must come after the call to |openNewTab:| which clears the jumpback
|
// This must come after the call to |openNewTab:| which clears the jumpback
|
||||||
// tab and changes the selected tab to the new tab.
|
// tab and changes the selected tab to the new tab.
|
||||||
if (inSetJumpback)
|
if (inSetJumpback && !aLoadInBG)
|
||||||
[mTabBrowser setJumpbackTab:previouslySelected];
|
[mTabBrowser setJumpbackTab:previouslySelected];
|
||||||
|
|
||||||
[[newTab view] loadURI:aURLSpec referrer:aReferrer flags:NSLoadFlagsNone activate:!aLoadInBG allowPopups:inAllowPopups];
|
[[newTab view] loadURI:aURLSpec referrer:aReferrer flags:NSLoadFlagsNone activate:!aLoadInBG allowPopups:inAllowPopups];
|
||||||
|
@ -3014,6 +3014,7 @@ enum BWCOpenDest {
|
||||||
// jump back to if this new one is closed w/out switching to any other tabs.
|
// jump back to if this new one is closed w/out switching to any other tabs.
|
||||||
// This must come after the call to |openNewTab:| which clears the jumpback
|
// This must come after the call to |openNewTab:| which clears the jumpback
|
||||||
// tab and changes the selected tab to the new tab.
|
// tab and changes the selected tab to the new tab.
|
||||||
|
if (!inLoadInBG)
|
||||||
[mTabBrowser setJumpbackTab:previouslySelected];
|
[mTabBrowser setJumpbackTab:previouslySelected];
|
||||||
|
|
||||||
return [[newTab view] getBrowserView];
|
return [[newTab view] getBrowserView];
|
||||||
|
|
|
@ -432,7 +432,7 @@ static const unsigned int kMaxTitleLength = 50;
|
||||||
{
|
{
|
||||||
BOOL backgroundLoad = [[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadInBackground" withSuccess:NULL];
|
BOOL backgroundLoad = [[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadInBackground" withSuccess:NULL];
|
||||||
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL])
|
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL])
|
||||||
[bwc openNewTabWithURL:itemURL referrer:nil loadInBackground:backgroundLoad allowPopups:NO];
|
[bwc openNewTabWithURL:itemURL referrer:nil loadInBackground:backgroundLoad allowPopups:NO setJumpback:NO];
|
||||||
else
|
else
|
||||||
[bwc openNewWindowWithURL:itemURL referrer: nil loadInBackground:backgroundLoad allowPopups:NO];
|
[bwc openNewWindowWithURL:itemURL referrer: nil loadInBackground:backgroundLoad allowPopups:NO];
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
|
||||||
if (cmdKeyDown)
|
if (cmdKeyDown)
|
||||||
{
|
{
|
||||||
if (openInTabs)
|
if (openInTabs)
|
||||||
[mBrowserWindowController openNewTabWithURL:url referrer:nil loadInBackground:loadInBackground allowPopups:NO];
|
[mBrowserWindowController openNewTabWithURL:url referrer:nil loadInBackground:loadInBackground allowPopups:NO setJumpback:YES];
|
||||||
else
|
else
|
||||||
[mBrowserWindowController openNewWindowWithURL:url referrer: nil loadInBackground:loadInBackground allowPopups:NO];
|
[mBrowserWindowController openNewWindowWithURL:url referrer: nil loadInBackground:loadInBackground allowPopups:NO];
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
|
||||||
while ((curItem = [itemsEnum nextObject]))
|
while ((curItem = [itemsEnum nextObject]))
|
||||||
{
|
{
|
||||||
if ([curItem isKindOfClass:[HistorySiteItem class]])
|
if ([curItem isKindOfClass:[HistorySiteItem class]])
|
||||||
[mBrowserWindowController openNewTabWithURL:[curItem url] referrer:nil loadInBackground:backgroundLoad allowPopups:NO];
|
[mBrowserWindowController openNewTabWithURL:[curItem url] referrer:nil loadInBackground:backgroundLoad allowPopups:NO setJumpback:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче