зеркало из https://github.com/mozilla/gecko-dev.git
fix bug 248720 - tabs do not change properly to reflect a new tab set. sr=pinkerton
This commit is contained in:
Родитель
c7ed3da614
Коммит
a5e5983d78
|
@ -404,7 +404,7 @@ const int kReuseWindowOnAE = 2;
|
|||
else if (openInNewTab)
|
||||
[browserWindowController openURLArray:[(BookmarkFolder *)item childURLs] replaceExistingTabs:NO];
|
||||
else
|
||||
[browserWindowController openURLArray:[(BookmarkFolder *)item childURLs] replaceExistingTabs:YES];
|
||||
[browserWindowController openURLArrayReplacingTabs:[(BookmarkFolder *)item childURLs] closeExtraTabs:[item isGroup]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -286,6 +286,7 @@ typedef enum
|
|||
- (void)openNewTabWithURL: (NSString*)aURLSpec referrer: (NSString*)aReferrer loadInBackground: (BOOL)aLoadInBG;
|
||||
|
||||
- (void)openURLArray:(NSArray*)urlArray replaceExistingTabs:(BOOL)replaceExisting;
|
||||
- (void)openURLArrayReplacingTabs:(NSArray*)urlArray closeExtraTabs:(BOOL)closeExtra;
|
||||
|
||||
-(BrowserTabViewItem*)createNewTabItem;
|
||||
|
||||
|
|
|
@ -2571,6 +2571,18 @@ enum BWCOpenDest {
|
|||
[mTabBrowser selectTabViewItemAtIndex:replaceExisting ? 0 : curNumTabs];
|
||||
}
|
||||
|
||||
-(void) openURLArrayReplacingTabs:(NSArray*)urlArray closeExtraTabs:(BOOL)closeExtra
|
||||
{
|
||||
[self openURLArray:urlArray replaceExistingTabs:YES];
|
||||
if (closeExtra) {
|
||||
int closeIndex = [urlArray count];
|
||||
int closeCount = [mTabBrowser numberOfTabViewItems] - closeIndex;
|
||||
for (int i = 0; i < closeCount; i++) {
|
||||
[[mTabBrowser tabViewItemAtIndex:closeIndex] closeTab];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(BrowserTabViewItem*)createNewTabItem
|
||||
{
|
||||
BrowserTabViewItem* newTab = [BrowserTabView makeNewTabItem];
|
||||
|
|
Загрузка…
Ссылка в новой задаче