Fixed: <rdar://problem/3879870> Flash Player unable to stop data stream from continu...
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Dec 2004 22:44:49 +0000 (22:44 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Dec 2004 22:44:49 +0000 (22:44 +0000)
commitfe6781366805950264af5237815a0432e8e5d000
treed03b876d3d52d4dee6fda6b44de0c211ef8362a8
parent35db58acb21602a4fa0f88a1edfa628bf14aff43
Fixed: <rdar://problem/3879870> Flash Player unable to stop data stream from continuing to download by returning -1 from NPP_Write
Also improved and cleaned-up the plug-in stream termination code.

        Reviewed by john.

        * Plugins.subproj/WebBaseNetscapePluginStream.h:
        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (+[WebBaseNetscapePluginStream reasonForError:]): return NPRES_DONE for a nil error
        (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]): new, factored out from other methods
        (-[WebBaseNetscapePluginStream errorForReason:]): new
        (-[WebBaseNetscapePluginStream dealloc]): release MIME type
        (-[WebBaseNetscapePluginStream setMIMEType:]): new
        (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]): call setMIMEType so we can use it in _pluginCancelledConnectionError, call renamed methods
        (-[WebBaseNetscapePluginStream _destroyStream]): prepended underscore, replaced some early returns with asserts as the callers are now smarter
        (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]): prepended underscore, only call _destroyStream if there is an error or if the load is complete and there is no more data to be streamed
        (-[WebBaseNetscapePluginStream cancelLoadWithError:]): new, overridden by subclasses to cancel the actual NSURLConnection
        (-[WebBaseNetscapePluginStream destroyStreamWithError:]): new, calls _destroyStreamWithReason
        (-[WebBaseNetscapePluginStream finishedLoadingWithData:]): call renamed methods
        (-[WebBaseNetscapePluginStream _deliverData]): prepended underscore, call cancelLoadAndDestroyStreamWithError if NPP_Write returns a negative number
        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView destroyStream:reason:]): call cancelLoadAndDestroyStreamWithError
        * Plugins.subproj/WebNetscapePluginRepresentation.m:
        (-[WebNetscapePluginRepresentation receivedError:withDataSource:]): call destroyStreamWithError
        (-[WebNetscapePluginRepresentation cancelLoadWithError:]): new, override method, tell the data source to stop loading
        * Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream cancelLoadWithError:]): new, override method, tell the loader to stop
        (-[WebNetscapePluginStream stop]): call cancelLoadAndDestroyStreamWithError
        (-[WebNetscapePluginConnectionDelegate isDone]): new
        (-[WebNetscapePluginConnectionDelegate didReceiveResponse:]): call cancelLoadAndDestroyStreamWithError
        (-[WebNetscapePluginConnectionDelegate didFailWithError:]): call destroyStreamWithError

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit/ChangeLog
WebKit/Plugins.subproj/WebBaseNetscapePluginStream.h
WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m
WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
WebKit/Plugins.subproj/WebNetscapePluginRepresentation.m
WebKit/Plugins.subproj/WebNetscapePluginStream.m