diff --git a/mozilla/camino/src/browser/BrowserWindowController.mm b/mozilla/camino/src/browser/BrowserWindowController.mm index 9a3209f5bd5..8b7e8294de1 100644 --- a/mozilla/camino/src/browser/BrowserWindowController.mm +++ b/mozilla/camino/src/browser/BrowserWindowController.mm @@ -1220,6 +1220,10 @@ enum BWCOpenDest { { if (activateContent) { + // if we're the front/key window, focus the content area. If we're not, + // set gecko as the first responder so that it will be activated when + // the window is focused. If the user is typing in the urlBar, however, + // don't mess with the focus at all. if ([[self window] isKeyWindow]) { if (![self userChangedLocationField]) diff --git a/mozilla/camino/src/browser/BrowserWrapper.h b/mozilla/camino/src/browser/BrowserWrapper.h index 9c2ada16cbd..31d5d0efcab 100644 --- a/mozilla/camino/src/browser/BrowserWrapper.h +++ b/mozilla/camino/src/browser/BrowserWrapper.h @@ -71,7 +71,7 @@ class nsISupportsArray; @interface BrowserWrapper : NSView { - NSWindow* mWindow; // the window we are or will be in + NSWindow* mWindow; // the window we are or will be in (never nil) // XXX the BrowserWrapper really shouldn;t know anything about the tab that it's in NSTabViewItem* mTabItem; diff --git a/mozilla/camino/src/browser/BrowserWrapper.mm b/mozilla/camino/src/browser/BrowserWrapper.mm index e6e5e44302b..dba835547e8 100644 --- a/mozilla/camino/src/browser/BrowserWrapper.mm +++ b/mozilla/camino/src/browser/BrowserWrapper.mm @@ -322,7 +322,6 @@ static NSString* const kOfflineNotificationName = @"offlineModeChanged"; mListenersAttached = YES; // We need to hook up our click and context menu listeners. - // XXX broken ContentClickListener* clickListener = new ContentClickListener([mWindow delegate]); if (!clickListener) return; @@ -338,15 +337,6 @@ static NSString* const kOfflineNotificationName = @"offlineModeChanged"; - (void)didBecomeActiveBrowser { - { -#if 0 - [mDefaultStatusString autorelease]; - mDefaultStatusString = nil; - [mLoadingStatusString autorelease]; - mLoadingStatusString = [NSLocalizedString(@"DocumentDone", @"") retain]; -#endif - } - [self ensureContentClickListeners]; [self updateOfflineStatus]; [[NSNotificationCenter defaultCenter] addObserver:self @@ -367,11 +357,8 @@ static NSString* const kOfflineNotificationName = @"offlineModeChanged"; - (void)onLoadingStarted { - if (mDefaultStatusString) - { - [mDefaultStatusString autorelease]; - mDefaultStatusString = nil; - } + [mDefaultStatusString autorelease]; + mDefaultStatusString = nil; mProgress = 0.0; mIsBusy = YES; @@ -396,25 +383,6 @@ static NSString* const kOfflineNotificationName = @"offlineModeChanged"; - (void)onLoadingCompleted:(BOOL)succeeded { -#if 0 - if (mActivateOnLoad) - { - // if we're the front/key window, focus the content area. If we're not, - // set gecko as the first responder so that it will be activated when - // the window is focused. If the user is typing in the urlBar, however, - // don't mess with the focus at all. - if (mDelegate) - { - if (![mDelegate userChangedLocationField] && [mWindow isKeyWindow]) - [mBrowserView setActive:YES]; - else - [mWindow makeFirstResponder:mBrowserView]; - - } - mActivateOnLoad = NO; - } -#endif - [mDelegate loadingDone:mActivateOnLoad]; mActivateOnLoad = NO;