Skip to content
  • adele's avatar
    WebCore: · dd237c40
    adele authored
            Fix by Darin, reviewed by me.
    
            Fix for <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
    
            * platform/mac/WidgetMac.mm:
            (WebCore::safeRemoveFromSuperview): Added. If the view is the window's first responder, then 
             set the window's first responder to nil so we don't leave the window pointing to a view that's no longer in it.
            (WebCore::Widget::setFocus): Don't attempt to focus the view if it has no window.
            (WebCore::Widget::removeFromSuperview): Call safeRemoveFromSuperview.
            (WebCore::Widget::afterMouseDown): ditto.
    
    WebKit:
    
            Fix by Darin, reviewed by me.
    
            Fix for <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
    
            * WebView/WebFrameView.mm: (-[WebFrameView _setDocumentView:]): If the old view is the first responder,
            then set the window's first responder to nil so we don't leave the window pointing to a view that's no longer in it.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dd237c40