Skip to content
  • kdecker@apple.com's avatar
    2007-12-04 Kevin Decker <kdecker@apple.com> · 4e81115b
    kdecker@apple.com authored
            Reviewed by Darin.
    
            Revised fix for: <rdar://problem/5586978> REGRESSION (Safari 2-3): WebKit sometimes doesn't invoke Flash's NPP_SetWindow function and causes a hang
    
            This fix is exactly the same as chageset 28359 with the exception of an added early return in
            updateAndSetWindow to cover the additional case of when a plug-in isn't drawable.
            
            The CG-based Flash player would sometimes hang because (for CoreGraphics-based plug-ins) our code would
            only call into the NPP_SetWindow() function when we tell the plug-in to draw. This created havoc with 
            Flash because Flash expects the browser to call NPP_SetWindow() and provide a valid graphics context 
            regardless of whether or not it actually needs to draw. 
            
            * Plugins/WebBaseNetscapePluginView.mm:
            (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Removed an incorrect comment and toned
            down an ASSERT that was too strict. 
            (-[WebBaseNetscapePluginView updateAndSetWindow]): Removed an early return for CoreGraphics-based plug-ins
            which would sometimes altogether prevent updating the PortState and calling into a plug-ins NPP_SetWindow()
            function. Also tweaked a comment and added an early return if the plug-in can't draw.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4e81115b