1. 27 Oct, 2008 2 commits
    • andersca@apple.com's avatar
      2008-10-27 Anders Carlsson <andersca@apple.com> · 922a50eb
      andersca@apple.com authored
              Reviewed by Darin Adler.
      
              Change the Obj-C init methods to simply call WebNetscapePluginStream::create.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              (WebNetscapePluginStream::create):
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
              (WebNetscapePluginStream::WebNetscapePluginStream):
              (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      922a50eb
    • andersca@apple.com's avatar
      2008-10-27 Anders Carlsson <andersca@apple.com> · 71d0d106
      andersca@apple.com authored
              Reviewed by Kevin Decker.
      
              Convert more code over to C++.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              (WebNetscapePluginStream::plugin):
              (WebNetscapePluginStream::setRequestURL):
              Convert to C++.
      
              * Plugins/WebBaseNetscapePluginStream.mm:
              (WebNetscapePluginStream::start):
              (WebNetscapePluginStream::stop):
              Ditto.
              
              (WebNetscapePluginStream::startStreamWithResponse):
              Ditto.
              
              (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
              Call the C++ version.
              
              (-[WebBaseNetscapePluginStream impl]):
              New accessor for the C++ class.
              
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView pluginView:receivedData:]):
              (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
              (-[WebBaseNetscapePluginView destroyStream:reason:]):
              Call the C++ methods.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71d0d106
  2. 06 Oct, 2008 6 commits
    • andersca@apple.com's avatar
      2008-10-06 Anders Carlsson <andersca@apple.com> · 74953c02
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Make WebNetscapePluginStream a WebCore::NetscapePlugInStreamLoaderClient.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              (WebNetscapePluginStream::~WebNetscapePluginStream):
              * Plugins/WebBaseNetscapePluginStream.mm:
              (WebNetscapePluginStream::didReceiveResponse):
              (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
              (WebNetscapePluginStream::wantsAllStreams):
              (-[WebBaseNetscapePluginStream wantsAllStreams]):
              (WebNetscapePluginStream::didFail):
              (-[WebBaseNetscapePluginStream destroyStreamWithError:]):
              (WebNetscapePluginStream::didFinishLoading):
              (-[WebBaseNetscapePluginStream finishedLoading]):
              (WebNetscapePluginStream::didReceiveData):
              (-[WebBaseNetscapePluginStream receivedData:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74953c02
    • andersca@apple.com's avatar
      2008-10-06 Anders Carlsson <andersca@apple.com> · b8aec835
      andersca@apple.com authored
              Bring back the stop method. It was called through performSelector, which
              is why I couldn't find any references to it.
      
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream stop]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8aec835
    • andersca@apple.com's avatar
      2008-10-06 Anders Carlsson <andersca@apple.com> · a3c0d386
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              More conversion and cleanup.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (WebNetscapePluginStream::startStream):
              (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a3c0d386
    • andersca@apple.com's avatar
      2008-10-06 Anders Carlsson <andersca@apple.com> · f9f3fba9
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Fold initWithRequestURL into initWithRequest.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9f3fba9
    • andersca@apple.com's avatar
      2008-10-06 Anders Carlsson <andersca@apple.com> · 6c6faba0
      andersca@apple.com authored
              Reviewed by David Hyatt.
      
              Convert more methods over to C++.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (WebNetscapePluginStream::ownerForStream):
              (WebNetscapePluginStream::pluginCancelledConnectionError):
              (WebNetscapePluginStream::errorForReason):
              (-[WebBaseNetscapePluginStream errorForReason:]):
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
              (WebNetscapePluginStream::cancelLoadAndDestroyStreamWithError):
              (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError:]):
              (WebNetscapePluginStream::deliverData):
              (WebNetscapePluginStream::deliverDataTimerFired):
              (WebNetscapePluginStream::deliverDataToFile):
              (-[WebBaseNetscapePluginStream finishedLoading]):
              (-[WebBaseNetscapePluginStream receivedData:]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView destroyStream:reason:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c6faba0
    • andersca@apple.com's avatar
      2008-10-06 Anders Carlsson <andersca@apple.com> · fccb1b99
      andersca@apple.com authored
              Reviewed by David Hyatt.
      
              Convert more methods over to C++.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (WebNetscapePluginStream::reasonForError):
              (WebNetscapePluginStream::destroyStreamWithReason):
              (WebNetscapePluginStream::cancelLoadWithError):
              (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
              (WebNetscapePluginStream::destroyStreamWithError):
              (-[WebBaseNetscapePluginStream destroyStreamWithError:]):
              (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError:]):
              (-[WebBaseNetscapePluginStream _deliverDataToFile:]):
              (-[WebBaseNetscapePluginStream finishedLoading]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithError:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fccb1b99
  3. 03 Oct, 2008 3 commits
    • andersca@apple.com's avatar
      2008-10-03 Anders Carlsson <andersca@apple.com> · 0e53bace
      andersca@apple.com authored
              Reviewed by David Hyatt.
              
              Convert destroyStream over to C++.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (WebNetscapePluginStream::destroyStream):
              (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
              (-[WebBaseNetscapePluginStream _deliverData]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e53bace
    • andersca@apple.com's avatar
      2008-10-03 Anders Carlsson <andersca@apple.com> · 8a31faf3
      andersca@apple.com authored
              Reviewed by David Hyatt.
      
              Use a Timer instead of -[NSObject performSelector:withObject:afterDelay];
              
              * Plugins/WebBaseNetscapePluginStream.h:
              (WebNetscapePluginStream::WebNetscapePluginStream):
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream _destroyStream]):
              (-[WebBaseNetscapePluginStream _deliverData]):
              (WebNetscapePluginStream::deliverDataTimerFired):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a31faf3
    • andersca@apple.com's avatar
      2008-10-03 Anders Carlsson <andersca@apple.com> · d3c32f56
      andersca@apple.com authored
              Reviewed by David Hyatt.
      
              More plug-in stream cleanup.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              (WebNetscapePluginStream::create):
              (WebNetscapePluginStream::WebNetscapePluginStream):
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
              (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream dealloc]):
              (-[WebBaseNetscapePluginStream finalize]):
              (-[WebBaseNetscapePluginStream setPlugin:]):
              (WebNetscapePluginStream::setPlugin):
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
              (-[WebBaseNetscapePluginStream _destroyStream]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d3c32f56
  4. 18 Sep, 2008 1 commit
    • andersca@apple.com's avatar
      2008-09-18 Anders Carlsson <andersca@apple.com> · 8227ba53
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Move the remainder of the stream ivars to the C++ object.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              (WebNetscapePluginStream::WebNetscapePluginStream):
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
              (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
              (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream dealloc]):
              (-[WebBaseNetscapePluginStream finalize]):
              (-[WebBaseNetscapePluginStream setPlugin:]):
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
              (-[WebBaseNetscapePluginStream start]):
              (-[WebBaseNetscapePluginStream stop]):
              (-[WebBaseNetscapePluginStream wantsAllStreams]):
              (-[WebBaseNetscapePluginStream _destroyStream]):
              (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
              (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
              (-[WebBaseNetscapePluginStream _deliverData]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8227ba53
  5. 16 Sep, 2008 4 commits
    • andersca@apple.com's avatar
      2008-09-16 Anders Carlsson <andersca@apple.com> · 6da3533c
      andersca@apple.com authored
              Reviewed by Cameron Zwarich.
      
              Move more instance variables down to the C++ class.
      
              * Plugins/WebBaseNetscapePluginStream.h:
              (WebNetscapePluginStream::WebNetscapePluginStream):
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream dealloc]):
              (-[WebBaseNetscapePluginStream finalize]):
              (-[WebBaseNetscapePluginStream transferMode]):
              (-[WebBaseNetscapePluginStream plugin]):
              (-[WebBaseNetscapePluginStream setPlugin:]):
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
              (-[WebBaseNetscapePluginStream wantsAllStreams]):
              (-[WebBaseNetscapePluginStream _destroyStream]):
              (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
              (-[WebBaseNetscapePluginStream _deliverData]):
              (-[WebBaseNetscapePluginStream _deliverDataToFile:]):
              (-[WebBaseNetscapePluginStream finishedLoading]):
              (-[WebBaseNetscapePluginStream receivedData:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6da3533c
    • andersca@apple.com's avatar
      2008-09-16 Anders Carlsson <andersca@apple.com> · 704b6989
      andersca@apple.com authored
              Reviewed by Dave Hyatt.
      
              Move a bunch of instance variables into the C++ class.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
              (-[WebBaseNetscapePluginStream errorForReason:]):
              (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream dealloc]):
              (-[WebBaseNetscapePluginStream setRequestURL:]):
              (-[WebBaseNetscapePluginStream setResponseURL:]):
              (-[WebBaseNetscapePluginStream setMIMEType:]):
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
              (-[WebBaseNetscapePluginStream _destroyStream]):
              (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
              (-[WebBaseNetscapePluginStream _deliverData]):
              (-[WebBaseNetscapePluginStream receivedData:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      704b6989
    • andersca@apple.com's avatar
      2008-09-16 Anders Carlsson <andersca@apple.com> · 8b7e8938
      andersca@apple.com authored
              Reviewed by Dave Hyatt.
      
              Add a new WebNetscapePluginStream C++ class. The idea is that it is supposed to replace the Obj-C 
              WebBaseNetscapePluginStream class. The plan is to gradually move/rewrite code from the Obj-C class to the C++ class
              until the C++ class can replace the Obj-C class.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              (WebNetscapePluginStream::create):
              (WebNetscapePluginStream::WebNetscapePluginStream):
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
              (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream dealloc]):
              (-[WebBaseNetscapePluginStream finalize]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b7e8938
    • andersca@apple.com's avatar
      2008-09-16 Anders Carlsson <andersca@apple.com> · 87e09c11
      andersca@apple.com authored
              Reviewed by Dave Hyatt.
      
              Instead of storing a pointer to NPP method individually, just store a pointer to the NPNetscapeFuncs vtable.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream setPlugin:]):
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
              (-[WebBaseNetscapePluginStream wantsAllStreams]):
              (-[WebBaseNetscapePluginStream _destroyStream]):
              (-[WebBaseNetscapePluginStream _deliverData]):
              * Plugins/WebNetscapePluginPackage.h:
              * Plugins/WebNetscapePluginPackage.m:
              (-[WebNetscapePluginPackage pluginFuncs]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87e09c11
  6. 15 Sep, 2008 1 commit
    • andersca@apple.com's avatar
      WebKit: · ba0d955c
      andersca@apple.com authored
      2008-09-15  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Mitz.
      
              Merge WebNetscapePluginStream into WebBaseNetscapePluginStream.
              
              * WebKit.xcodeproj/project.pbxproj:
      
      WebKit/mac:
      
      2008-09-15  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Mitz.
      
              Merge WebNetscapePluginStream into WebBaseNetscapePluginStream.
      
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
              (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream dealloc]):
              (-[WebBaseNetscapePluginStream finalize]):
              (-[WebBaseNetscapePluginStream start]):
              (-[WebBaseNetscapePluginStream stop]):
              (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
              (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
              * Plugins/WebNetscapePluginEmbeddedView.mm:
              * Plugins/WebNetscapePluginStream.h: Removed.
              * Plugins/WebNetscapePluginStream.mm: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba0d955c
  7. 28 Jul, 2008 1 commit
    • andersca@apple.com's avatar
      ../../../../../../WebCore: · 991d5c39
      andersca@apple.com authored
      2008-07-28  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Kevin Decker.
      
              Based on a patch by Dimcho Balev.
      
              https://bugs.webkit.org/show_bug.cgi?id=18676
              Plug-In API Proposal: Enable plugins to receive response body when an HTTP error occurs
              
              * bridge/npapi.h:
              Add new enum values.
              
              * loader/NetscapePlugInStreamLoader.cpp:
              (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
              When the plug-in indicates that it wants all streams to be delivered, don't cancel the stream
              if an error occurs.
              
              * loader/NetscapePlugInStreamLoader.h:
              (WebCore::NetscapePlugInStreamLoaderClient::wantsAllStreams):
              Add new client method.
      
      ../../../../../../WebKit/mac:
      
      2008-07-28  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Kevin Decker.
      
              Based on a patch by Dimcho Balev.
              
              https://bugs.webkit.org/show_bug.cgi?id=18676
              Plug-In API Proposal: Enable plugins to receive response body when an HTTP error occurs
      
              * Plugins/WebBaseNetscapePluginStream.h:
              Add NPP_GetValue pointer.
              
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream setPlugin:]):
              Initialize NPP_GetValue.
              
              (-[WebBaseNetscapePluginStream wantsAllStreams]):
              Call NPP_GetValue.
              
              * Plugins/WebPlugInStreamLoaderDelegate.h:
              * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h:
              * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm:
              (WebNetscapePlugInStreamLoaderClient::wantsAllStreams):
              Implement this and call down to the stream.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      991d5c39
  8. 08 Jul, 2008 1 commit
    • jhoneycutt@apple.com's avatar
      2008-07-08 Jon Honeycutt <jhoneycutt@apple.com> · be3a861c
      jhoneycutt@apple.com authored
              Reviewed by Anders.
      
              Port r34988 to Mac: don't call NPP_DestroyStream if NPP_NewStream was
              unsuccessful.
      
              * Plugins/WebBaseNetscapePluginStream.h: Added new member,
              newStreamSuccessful.
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): Initialize new member.
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): If NPP_NewStream is successful, set
              newStreamSuccessful to YES.
              (-[WebBaseNetscapePluginStream _destroyStream]): Only call
              NPP_DestroyStream if newStreamSuccessful is true.
      
              Port r34988 to Mac: allow tests to define JavaScript to execute when
              NPP_DestroyStream or NPP_URLNotify is called.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
              (NPP_New): Remove initialization that happens in pluginAllocate. Look
              for new arguments onStreamDestroy and onURLNotify.
              (NPP_Destroy): Free onStreamDestroy and onURLNotify.
              (executeScript): Code moved from onStreamLoad.
              (NPP_NewStream): Call executeScript.
              (NPP_DestroyStream): Same.
              (NPP_URLNotify): Same.
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be3a861c
  9. 08 Mar, 2008 1 commit
    • ddkilzer@apple.com's avatar
      JavaScriptCore: · 13321fec
      ddkilzer@apple.com authored
              Unify concept of enabling Netscape Plug-in API (NPAPI).
      
              Reviewed by Darin.
      
              * wtf/Platform.h: Define ENABLE_NETSCAPE_PLUGIN_API here.
      
      WebCore:
      
              Unify concept of enabling Netscape Plug-in API (NPAPI).
      
              Reviewed by Darin.
      
              No test cases since there is no change in functionality.
      
              * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
              If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
              * WebCore.NPAPI.exp: Added.
              * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
              * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
              comments) since we now handle exported NPAPI methods via DerivedSources.make.
      
              * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
              defined in Platform.h.
      
              * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              (-[DOMElement _NPObject]):
      
              * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
              ENABLE(NETSCAPE_PLUGIN_API).
              * bridge/NP_jsobject.h: Ditto.
              * bridge/c/c_class.cpp: Ditto.
              * bridge/c/c_class.h: Ditto.
              * bridge/c/c_instance.cpp: Ditto.
              * bridge/c/c_instance.h: Ditto.
              * bridge/c/c_runtime.cpp: Ditto.
              * bridge/c/c_runtime.h: Ditto.
              * bridge/c/c_utility.cpp: Ditto.
              * bridge/c/c_utility.h: Ditto.
              * bridge/npruntime.cpp: Ditto.
              * bridge/npruntime_impl.h: Ditto.
              * bridge/npruntime_priv.h: Ditto.
              * bridge/runtime.cpp: Ditto.
              (KJS::Bindings::Instance::createBindingForLanguageInstance):
      
              * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              (WebCore::HTMLPlugInElement::HTMLPlugInElement):
              (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
              * html/HTMLPlugInElement.h: Ditto.
      
              * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              (WebCore::Frame::clearScriptObjects):
              (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
              guard around m_windowScriptNPObject.
              * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
              m_windowScriptNPObject.
              * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              (WebCore::Frame::createScriptInstanceForWidget):
      
      WebKit/mac:
      
              Unify concept of enabling Netscape Plug-in API (NPAPI).
      
              Reviewed by Darin.
      
              * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView.
      
              * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use
              ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h.
      
              * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with
              #if ENABLE(NETSCAPE_PLUGIN_API).
              * Plugins/WebBaseNetscapePluginStream.mm: Ditto.
              * Plugins/WebBaseNetscapePluginView.h: Ditto.
              * Plugins/WebBaseNetscapePluginView.mm: Ditto.
              * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto.
              * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto.
              * Plugins/WebBasePluginPackage.h: Ditto.
              * Plugins/WebBasePluginPackage.m: Ditto.
              (+[WebBasePluginPackage pluginWithPath:]):
              * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto.
              * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
              * Plugins/WebNetscapePluginEmbeddedView.h: Ditto.
              * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto.
              * Plugins/WebNetscapePluginPackage.h: Ditto.
              * Plugins/WebNetscapePluginPackage.m: Ditto.
              * Plugins/WebNetscapePluginStream.h: Ditto.
              * Plugins/WebNetscapePluginStream.mm: Ditto.
              * Plugins/WebPluginDatabase.m: Ditto.
              (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
              * Plugins/npapi.m: Ditto.
              * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
              (WebFrameLoaderClient::objectContentType):
              (WebFrameLoaderClient::createPlugin):
              * WebView/WebHTMLView.mm: Ditto.
              (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
              * WebView/WebHTMLViewInternal.h: Ditto.
      
              * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with
              #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate)
              category to (WebInternal) category so we don't expose the ENABLE() macro
              from the private header.
              (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
              (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
              * WebView/WebFrameInternal.h: Ditto.
              * WebView/WebFramePrivate.h: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13321fec
  10. 16 Dec, 2007 1 commit
  11. 24 Nov, 2007 1 commit
  12. 06 Nov, 2007 1 commit
  13. 08 Aug, 2007 1 commit
    • kdecker's avatar
      Reviewed by Anders Carlsson. · 4a959953
      kdecker authored
              Fixed: <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
              
              #ifdef'd out Netscape style plug-ins on 64-bit because Mac OS X doesn't support for 64-bit Carbon.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              * Plugins/WebBaseNetscapePluginView.h:
              * Plugins/WebBaseNetscapePluginView.mm:
              (+[WebBaseNetscapePluginView getCarbonEvent:]):
              (TSMEventHandler):
              * Plugins/WebBaseNetscapePluginViewInternal.h:
              * Plugins/WebBaseNetscapePluginViewPrivate.h:
              * Plugins/WebBasePluginPackage.m:
              (+[WebBasePluginPackage pluginWithPath:]):
              * Plugins/WebNetscapePluginEmbeddedView.h:
              * Plugins/WebNetscapePluginEmbeddedView.mm:
              * Plugins/WebNetscapePluginPackage.h:
              * Plugins/WebNetscapePluginPackage.m:
              * Plugins/WebNetscapePluginStream.h:
              * Plugins/WebNetscapePluginStream.mm:
              * P...
      4a959953
  14. 12 Apr, 2007 1 commit
    • ggaren's avatar
      JavaScriptCore: · 6f017c14
      ggaren authored
              Reviewed by Darin Adler.
      
              http://bugs.webkit.org/show_bug.cgi?id=13029
              rdar://problem/4994849
              Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
              This doesn't actually change JavaScriptCore, but that's where npapi.h is.
      
              * bindings/npapi.h:
              Add headers member to NPStream struct.  Also increase NP_VERSION_MINOR to 18.
              Increasing to >= 17 allows plug-ins to safely detect whether to look for
              NPStream::headers.  Increasing from 17 to 18 reflects presence of NPObject
              enumeration, which was added in a prior patch, and which has been agreed to
              constitute version 18 by the plugin-futures list.  Also add other missing
              bits of npapi.h to catch up from 14 to 18.  This includes features that are
              not implemented in WebKit, but those are safely stubbed.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              http://bugs.webkit.org/show_bug.cgi?id=13029
              rdar://problem/4994849
              Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
      
              * http/tests/plugins/npapi-response-headers-expected.txt: Added.
              * http/tests/plugins/npapi-response-headers.html: Added.
              * http/tests/plugins/resources/load-me-1.txt: Added.
              * http/tests/plugins/resources/load-me-2.txt: Added.
      
      WebKit:
      
              Reviewed by Darin Adler.
      
              http://bugs.webkit.org/show_bug.cgi?id=13029
              rdar://problem/4994849
              Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
      
              * Plugins/WebBaseNetscapePluginStream.h: declarations.
              * Plugins/WebBaseNetscapePluginStream.mm: main implementation.
              (-[WebBaseNetscapePluginStream dealloc]): cleanup.
              (-[WebBaseNetscapePluginStream finalize]): cleanup.
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
              Pass headers along.
              (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
              Main work is here.  Extract headers from NSHTTPURLResponse object into a byte sequence.
              See comments here about how it would be nice to have low-level access to the HTTP response.
              (-[WebBaseNetscapePluginStream _destroyStream]): cleanup.
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
              Conform to new startStream params.  Not applicable here, pass nil.
      
      WebKitTools:
      
              Reviewed by Darin Adler.
      
              http://bugs.webkit.org/show_bug.cgi?id=13029
              rdar://problem/4994849
              Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
              Changes in WebKitTools are only for the NPAPI test plugin.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: main test logic.
              (pluginInvoke): support null window argument for NPStream creation.
              (pluginAllocate): initialization.
              (pluginDeallocate): cleanup.
              (handleCallback): add second JS callback arg: header dump.
              (notifyStream): added; hook from NPP_NewStream to record headers.
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: declarations.
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c: call new header hook.
              (NPP_NewStream): call new header hook.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f017c14
  15. 02 Apr, 2007 1 commit
    • andersca's avatar
      Reviewed by Geoff. · 5d7bfe63
      andersca authored
              Fix crash when running plugins/destroy-stream-twice.html under GuardMalloc
      
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (+[WebBaseNetscapePluginStream ownerForStream:]):
              (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
              (-[WebBaseNetscapePluginStream dealloc]):
              (-[WebBaseNetscapePluginStream finalize]):
              Change the streams hash map to contain an NPStream*, and change ownerForStream to take an NPStream*.
              
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView destroyStream:reason:]):
              Check that the NPStream pointer is valid before accessing stream->ndata.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d7bfe63
  16. 29 Mar, 2007 1 commit
    • ggaren's avatar
      Reluctantly tolerated by Darin Adler. · ff861b0b
      ggaren authored
              
              Fixed <rdar://problem/5091330> REGRESSION: Repro crash in 
              -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
              navigating away from page with DivX movie plug-in (13203)
              
              The problem was that the DivX plug-in would ask us to destroy an NPStream
              that had already been destroyed, causing us to wander off into freed
              memory. (I believe the reason this was a regression was that we never used 
              to destroy plug-in streams, period.)
              
              The solution here is to track the NPStreams belonging to a plug-in, and 
              guard against plug-ins making calls with NPStreams that don't belong to 
              them. (It turns out that NPN_DestroyStream is the only stream-based 
              plug-in call we support.)
      
              (CarbonPathFromPOSIXPath): Fixed up a cast to be C++ compatible.
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView destroyStream:reason:]): The actual fix.
              Use helper method to guard against a plug-in using an NPStream that doesn't
              belong to it.
              * WebKit.xcodeproj/project.pbxproj: Made WebBaseNetscapePluginView ObjC++
              so I could use HashMap.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff861b0b
  17. 25 Dec, 2006 1 commit
    • ggaren's avatar
      Reviewed by Oliver Hunt. · 04bf5613
      ggaren authored
              
              Some refactoring in preparation for fixing <rdar://problem/4778898> 
              REGRESSION: crash in getInstanceForView() when quitting from kcbs.com
              
              Two renames:
                  - "plugin" => "pluginPackage" (since the type is WebNetscapePluginPackage *)
                  - "instance" and/or "pluginPointer" => plugin (since NPP is an opaque handle to a plug-in)
              
              Removed braces around single-line 'if' statements.
              
              Made plugin a pointer instead of an inline ivar. This allows us to NULL
              it out once we call NPP_Destroy on it.
              
              Added helper functions for creating and destroying plugin. The destroy function
              NULLs out plugin, which helps with debugging.
                  
              (-[WebBaseNetscapePluginView willCallPlugInFunction]): Added an ASSERT
              to catch attempts to call functions on destroyed plug-ins.
      
              (-[WebBaseNetscapePluginView _createPlugin]): New helper function.
              (-[WebBaseNetscapePluginView _destroyPlugin]): New helper function.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04bf5613
  18. 10 Oct, 2006 1 commit
    • mjs's avatar
      WebCore: · b9c2c0e4
      mjs authored
              Rubber stamped by Eric.
      
              - moved a big honkin' pile of code over from WebKit; made minimal needed changes to compile
      
              * WebCore.exp:
              * WebCore.xcodeproj/project.pbxproj:
              * loader/mac/LoaderNSURLExtras.m: Added.
              * loader/mac/WebDataProtocol.m: Added.
              * loader/mac/WebDocumentLoader.m: Added.
              * loader/mac/WebFormDataStream.m: Added.
              * loader/mac/WebFrameLoader.m: Added.
              * loader/mac/WebLoader.m: Added.
              (-[NSURLProtocol didReceiveResponse:]):
              (-[NSURLProtocol didReceiveData:lengthReceived:allAtOnce:]):
              * loader/mac/WebMainResourceLoader.m: Added.
              (-[WebMainResourceLoader didReceiveResponse:]):
              * loader/mac/WebPolicyDecider.m: Added.
              * loader/mac/WebSubresourceLoader.h: Added.
              * loader/mac/WebSubresourceLoader.m: Added.
      
      WebKit:
      
              Rubber stamped by Eric.
              
              - moved a whole bunch of stuff over to WebCore - updated includes appropriately
      
              * Loader/LoaderNSURLExtras.h: Removed.
              * Loader/LoaderNSURLExtras.m: Removed.
              * Loader/WebDataProtocol.h: Removed.
              * Loader/WebDataProtocol.m: Removed.
              * Loader/WebDocumentLoader.h: Removed.
              * Loader/WebDocumentLoader.m: Removed.
              * Loader/WebFormDataStream.h: Removed.
              * Loader/WebFormDataStream.m: Removed.
              * Loader/WebFormState.h: Removed.
              * Loader/WebFormState.m: Removed.
              * Loader/WebFrameLoader.h: Removed.
              * Loader/WebFrameLoader.m: Removed.
              * Loader/WebFrameLoaderClient.h: Removed.
              * Loader/WebLoader.h: Removed.
              * Loader/WebLoader.m: Removed.
              * Loader/WebMainResourceLoader.h: Removed.
              * Loader/WebMainResourceLoader.m: Removed.
              * Loader/WebNetscapePlugInStreamLoader.h: Removed.
              * Loader/WebNetscapePlugInStreamLoader.m: Removed.
              * Loader/WebPlugInStreamLoaderDelegate.h: Removed.
              * Loader/WebPolicyDecider.h: Removed.
              * Loader/WebPolicyDecider.m: Removed.
              * Loader/WebSubresourceLoader.h: Removed.
              * Loader/WebSubresourceLoader.m: Removed.
              * Misc/WebNSURLExtras.m:
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginView.m:
              * Plugins/WebNetscapePluginStream.m:
              * Plugins/WebPluginContainerCheck.m:
              * Plugins/WebPluginController.m:
              * WebCoreSupport/WebFrameBridge.m:
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebDataSource.m:
              * WebView/WebDocumentLoaderMac.h:
              * WebView/WebFrame.m:
              * WebView/WebFrameInternal.h:
              * WebView/WebHTMLView.m:
              * WebView/WebPolicyDeciderMac.h:
              * WebView/WebPolicyDelegate.m:
              * WebView/WebView.m:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b9c2c0e4
  19. 15 Aug, 2006 1 commit
    • mjs's avatar
      Reviewed by Anders. · a520a4cc
      mjs authored
              
              - remove WebKit dependencies from WebPlugInStreamLoader via a protocol veil of ignorance
      
              * Loader/WebNetscapePlugInStreamLoader.h:
              * Loader/WebNetscapePlugInStreamLoader.m:
              (-[WebNetscapePlugInStreamLoader initWithDelegate:frameLoader:]):
              * Loader/WebPlugInStreamLoaderDelegate.h: Added.
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebNetscapePluginStream.m:
              (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
              * WebKit.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a520a4cc
  20. 11 Jun, 2006 1 commit
    • andersca's avatar
      WebCore: · c79dba31
      andersca authored
      2006-06-11  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Geoff.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=9390
              Move full-frame plugins to WebCore
              
              * WebCore.vcproj/WebCore/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              Add PluginDocument
              
              * bridge/mac/FrameMac.h:
              * bridge/mac/FrameMac.mm:
              (WebCore::FrameMac::redirectDataToPlugin):
              Call the bridge.
              
              * bridge/mac/WebCoreFrameBridge.h:
              * bridge/mac/WebCoreFrameBridge.mm:
              Add redirectDataToPlugin which is used to redirect incoming data
              to a plugin.
              
              * bridge/mac/WebCoreViewFactory.h:
              Add pluginSupportsMIMEType which returns whether any plugins support a given MIME type.
              
              * dom/DOMImplementation.cpp:
              * dom/DOMImplementation.h:
              Get rid of createTextDocument and just create a text document explicitly when needed.
              
              * dom/Document.h:
              (WebCore::Document::isPluginDocument):
              * loader/PluginDocument.cpp: Added.
              (WebCore::PluginTokenizer::PluginTokenizer):
              (WebCore::PluginTokenizer::wantsRawData):
              (WebCore::PluginTokenizer::write):
              (WebCore::PluginTokenizer::createDocumentStructure):
              (WebCore::PluginTokenizer::writeRawData):
              (WebCore::PluginTokenizer::stopParsing):
              (WebCore::PluginTokenizer::finish):
              (WebCore::PluginTokenizer::isWaitingForScripts):
              (WebCore::PluginDocument::PluginDocument):
              (WebCore::PluginDocument::createTokenizer):
              * loader/PluginDocument.h: Added.
              (WebCore::PluginDocument::isPluginDocument):
              Add PluginDocument.
              
              * page/Frame.cpp:
              (WebCore::Frame::begin):
              Possibly create a plugin document.
              
              * page/Frame.h:
              (WebCore::Frame::redirectDataToPlugin):
              Add declaration.
              
              * platform/PlugInInfoStore.h:
              * platform/mac/PlugInInfoStoreMac.mm:
              (WebCore::PlugInInfoStore::supportsMIMEType):
              Ask WebCoreViewFactory if the MIME type is supported.
      
      WebKit:
      
      2006-06-11  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Tim.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=9390
              Move full-frame plugins to WebCore
      
              * Plugins/WebBaseNetscapePluginStream.h:
              * Plugins/WebBaseNetscapePluginStream.m:
              (-[WebBaseNetscapePluginStream instance]):
              Add instance method which returns the plugin instance.
              
              * Plugins/WebBasePluginPackage.h:
              Add WebPluginManualLoader protocol
              
              * Plugins/WebNetscapePluginDocumentView.h: Removed.
              * Plugins/WebNetscapePluginDocumentView.m: Removed.
      
              * Plugins/WebNetscapePluginEmbeddedView.h:
              * Plugins/WebNetscapePluginEmbeddedView.m:
              (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:]):
              (-[WebNetscapePluginEmbeddedView dealloc]):
              (-[WebNetscapePluginEmbeddedView didStart]):
              (-[WebNetscapePluginEmbeddedView pluginView:receivedResponse:]):
              (-[WebNetscapePluginEmbeddedView pluginView:receivedData:]):
              (-[WebNetscapePluginEmbeddedView pluginView:receivedError:]):
              (-[WebNetscapePluginEmbeddedView pluginViewFinishedLoading:]):
              (-[WebNetscapePluginEmbeddedView redeliverStream]):
              Make WebNetscapePluginEmbeddedView support the WebPluginManualLoader protocol. It creates a plugin stream and feeds the
              data manually. Much of this code has been copied from WebNetscapePluginRepresentation.
      
              * Plugins/WebNetscapePluginRepresentation.h: Removed.
              * Plugins/WebNetscapePluginRepresentation.m: Removed.
      
              * Plugins/WebPluginController.h:
              * Plugins/WebPluginController.m:
              (-[WebPluginController pluginView:receivedResponse:]):
              (-[WebPluginController pluginView:receivedData:]):
              (-[WebPluginController pluginView:receivedError:]):
              (-[WebPluginController pluginViewFinishedLoading:]):
              Make WebPluginController support the WebPluginManualLoader protocol so it can feed data manually to WebKit plugins.
      
              * Plugins/WebPluginDatabase.m:        
              (-[WebPluginDatabase refresh]):
              Use WebHTMLView and WebHTMLRepresentation when registering/unregistering plug-in MIME types.
              
              * Plugins/WebPluginDocumentView.h: Removed.
              * Plugins/WebPluginDocumentView.m: Removed.
      
              * WebCoreSupport/WebFrameBridge.m:
              (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
              (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
              Add loadManually argument.
              
              (-[WebFrameBridge redirectDataToPlugin:]):
              Call down to the HTML representation.
              
              (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
              Pass NO to loadManually.
              
              (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
              Explicitly check if the MIME type is supported by a plug-in instead of checking the view class.
              
              * WebCoreSupport/WebViewFactory.m:
              (-[WebViewFactory pluginSupportsMIMEType:]):
              New function which returns whether any plugins support a given MIME type.
              
              * WebKit.xcodeproj/project.pbxproj:
              Update for removed files.
              
              * WebView/WebFrame.m:
              (-[WebFrame _reloadForPluginChanges]):
              Remove view type checks.
              
              (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
              (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
              Remove FIXME comments.
              
              * WebView/WebHTMLRepresentation.m:
              (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):        
              New function which redirects incoming data to a manual loader.
              
              (-[WebHTMLRepresentation receivedData:withDataSource:]):
              (-[WebHTMLRepresentation receivedError:withDataSource:]):
              (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
              Optionally redirect incoming data.
              
              * WebView/WebHTMLRepresentationPrivate.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c79dba31
  21. 09 Feb, 2006 1 commit
    • tomernic's avatar
      Reviewed by Tim Hatcher. · c9f700e7
      tomernic authored
              <rdar://problem/4153419> CrashTracer: 576 crashes in Safari at com.apple.WebKit: NPN_DestroyStream + 56
      
              I never could reproduce this crasher, which seems to be caused by the Speed Download plugin.  However,
              I did find a way to make the affected code more bulletproof for those who are experiencing the crash.
              
              * Plugins/WebBaseNetscapePluginStream.h:
              Keep a WebBaseNetscapePluginView instead of the WebNetscapePluginPackage, since the plugin view could
              potentially be deallocated before the stream finishes loading.
              * Plugins/WebBaseNetscapePluginStream.m:
              (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
              Use pluginView instead of plugin.
              (-[WebBaseNetscapePluginStream dealloc]):
              Assert that the plugin instance has been nulled out, since that's now part of the stream's teardown
              phase.
              Release pluginView instead of plugin.
              (-[WebBaseNetscapePluginStream setPluginPointer:]):
              Retain the plugin view instead of the plugin package, since the plugin view could be deallocated while
              the stream is running.
              This method now accepts a NULL argument so that we can easily clear out the pluginView backpointer
              (and other ivars derived from it).
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
              Use pluginView instead of plugin.
              (-[WebBaseNetscapePluginStream _destroyStream]):
              ditto
              (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
              ditto
              (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError]):
              Set the plugin instance to NULL, so that the pluginView backpointer is released.  This method is called
              for every plugin view's stream when the plugin view is stopped/destroyed.
              (-[WebBaseNetscapePluginStream _deliverData]):
              Use pluginView instead of plugin.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9f700e7
  22. 06 Feb, 2006 1 commit
    • mjs's avatar
      Rubber stamped by Hyatt. · cf09000b
      mjs authored
              
              - renamed subproject directories to not end with .subproj
      
              * Carbon: renamed from Carbon.subproj
              * DOM: renamed from DOM.subproj
              * History: renamed from History.subproj
              * Misc: renamed from Misc.subproj
              * Panels: renamed from Panels.subproj
              * Plugins: renamed from Plugins.subproj
              * WebCoreSupport: renamed from WebCoreSupport.subproj
              * WebInspector: renamed from WebInspector.subproj
              * WebView: renamed from WebView.subproj
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf09000b
  23. 05 Jun, 2005 1 commit
  24. 01 Dec, 2004 1 commit
    • cblu's avatar
      Fixed: <rdar://problem/3879870> Flash Player unable to stop data stream from... · 87bbe511
      cblu authored
      	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: http://svn.webkit.org/repository/webkit/trunk@8099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87bbe511
  25. 04 Oct, 2004 1 commit
    • cblu's avatar
      Fixed: <rdar://problem/3798948> NPP_URLNotify is not called if plug-in calls NPN_*URLNotfy · 2f5685f9
      cblu authored
      	Fixed a number of FIXME's related to notifying plug-ins of loaded pages.
      
              Reviewed by rjw.
      
              * Plugins.subproj/WebBaseNetscapePluginStream.h:
      		- replaced URL ivar with requestURL and responseURL ivars since we need to pass both to plug-ins
              	- added sendNotification boolean. Relying on notifyData not being NULL was not information to know whether to call NPP_URLNotify or not.
      		- added isTerminated boolean because determining whether or not stream.ndata is NULL is not enough to know if the stream has been cancelled.
      	* Plugins.subproj/WebBaseNetscapePluginStream.m:
              (+[WebBaseNetscapePluginStream reasonForError:]): new, factored out from receivedError:
              (-[WebBaseNetscapePluginStream initWithRequestURL:pluginPointer:notifyData:sendNotification:]): new
              (-[WebBaseNetscapePluginStream dealloc]): release new ivars
              (-[WebBaseNetscapePluginStream finalize]): added assert
              (-[WebBaseNetscapePluginStream setRequestURL:]): new
              (-[WebBaseNetscapePluginStream setResponseURL:]): new
              (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]): renamed, use responseURL as it basically did before
              (-[WebBaseNetscapePluginStream startStreamWithResponse:]): call renamed method
              (-[WebBaseNetscapePluginStream destroyStream]):
      		- do nothing if terminated
      		- call NPP_StreamAsFile and NPP_DestroyStream if stream.ndata is not NULL
      		- call NPP_URLNotify if sendNotification is YES regardless of value of notifyData
              (-[WebBaseNetscapePluginStream receivedError:]): call reasonForError
              (-[WebBaseNetscapePluginStream deliverData]): use renamed ivar
              * Plugins.subproj/WebBaseNetscapePluginView.h:
      		- added observingFrameLoadNotification boolean
      		- renamed dictionary ivar to pendingFrameLoads which has WebFrame keys and WebPluginRequest values
              * Plugins.subproj/WebBaseNetscapePluginView.m:
              (-[WebBaseNetscapePluginView addFrameLoadObserver]): new
              (-[WebBaseNetscapePluginView removeFrameLoadObserver]): new
              (-[WebBaseNetscapePluginView stop]): call removeFrameLoadObserver
              (-[WebBaseNetscapePluginView initWithFrame:]): use renamed pendingFrameLoads ivar
              (-[WebBaseNetscapePluginView dealloc]): ditto
              (-[WebBaseNetscapePluginView requestWithURLCString:]): set referrer on the request just as IE does
              (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
      		- call NPP_URLNotify depending of value of sendNotification
      		- call new init method on WebBaseNetscapePluginStream rather then setting variables individually
              (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]): new, calls NPP_URLNotify at the right time with the right value
              (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithError:]): new, delegate method called from WebFrame
              (-[WebBaseNetscapePluginView loadPluginRequest:]): call addFrameLoadObserver
              (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): take new sendNotification parameter and pass it
              (-[WebBaseNetscapePluginView getURLNotify:target:notifyData:]): pass YES for sendNotification
              (-[WebBaseNetscapePluginView getURL:target:]): pass NO for sendNotification
              (-[WebBaseNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]): take new sendNotification parameter and pass it
              (-[WebBaseNetscapePluginView postURLNotify:target:len:buf:file:notifyData:]): pass YES for sendNotification
              (-[WebBaseNetscapePluginView postURL:target:len:buf:file:]): pass NO for sendNotification
              (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:]): take new sendNotification parameter
              (-[WebPluginRequest sendNotification]): new
              * Plugins.subproj/WebBaseNetscapePluginViewPrivate.h:
              * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
              (-[WebNetscapePluginEmbeddedView didStart]): set referrer on the request just as IE does
              * Plugins.subproj/WebNetscapePluginRepresentation.m:
              (-[WebNetscapePluginRepresentation receivedData:withDataSource:]): set the request URL on the stream
              * Plugins.subproj/WebNetscapePluginStream.h:
              * Plugins.subproj/WebNetscapePluginStream.m:
              (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]): take new sendNotification parameter and pass it
              (-[WebNetscapePluginStream dealloc]): use renamed ivar
              (-[WebNetscapePluginStream start]): ditto
              * WebView.subproj/WebFrame.m:
              (-[WebFrame _setState:]): removed notification posting code. This was only used by WebBaseNetscapePluginView and it was the wrong notification to send.
              (-[WebFrame _checkLoadCompleteForThisFrame]): call internal load delegate to tell it that the load has finished
              (-[WebFrame _loadItem:withLoadType:]): ditto
              (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:formState:]): ditto
              (-[WebFrame _setInternalLoadDelegate:]): new
              (-[WebFrame _internalLoadDelegate]): new
              * WebView.subproj/WebFrameInternal.h:
              * WebView.subproj/WebFramePrivate.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f5685f9
  26. 21 Jun, 2004 1 commit
    • cblu's avatar
      WebKit: · f766bf02
      cblu authored
      	Fixed: <rdar://problem/3701269> change in error handling behavior from 10.3.3 to 10.3.4 breaks unreleased Adobe PDF plug-in
      
              Reviewed by john.
      
              * Misc.subproj/WebKitErrors.m:
              (registerErrors): register string for WebKitErrorPlugInCancelledConnection
              * Misc.subproj/WebKitErrorsPrivate.h:
              * Plugins.subproj/WebBaseNetscapePluginStream.h:
              * Plugins.subproj/WebBaseNetscapePluginStream.m:
              (-[WebBaseNetscapePluginStream startStreamWithURL:expectedContentLength:lastModifiedDate:MIMEType:]): use renamed WEB_REASON_PLUGIN_CANCELLED constant
              (-[WebBaseNetscapePluginStream destroyStream]): ditto
              * Plugins.subproj/WebNetscapePluginRepresentation.m:
              (-[WebNetscapePluginRepresentation cancelWithReason:]): if the reason is WEB_REASON_PLUGIN_CANCELLED, cancel the load with WebKitErrorPlugInCancelledConnection
              * Plugins.subproj/WebNetscapePluginStream.m:
              (-[WebNetscapePluginStream cancelWithReason:]): ditto
      
      WebBrowser:
      
      	Fixed: <rdar://problem/3701269> change in error handling behavior from 10.3.3 to 10.3.4 breaks unreleased Adobe PDF plug-in
      
              Reviewed by john.
      
              * LoadProgressMonitor.m:
              * LocationChangeHandler.m: if the error is WebKitErrorPlugInCancelledConnection ignore it
              (-[LocationChangeHandler webView:locationChangeDone:forDataSource:]): ditto
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f766bf02
  27. 25 Mar, 2004 1 commit
    • rjw's avatar
      Netscape plugin API header cleanup. · 06184374
      rjw authored
      	Replaced our hacked up version of npapi.h with the
      	"official SDK"  npapi.h.  Moved our changes to the new
      	npfunctions.h.  npfunctions.h really replaces what was defined in
      	the Netscape npupp.h header.  However, rather than use the "official SDK"
      	npupp.h I think the cleaner npfunctions.h is better. npupp.h actually
      	has a bunch of Mac classic specific stuff that is no longer needed.
      
      	Copied npruntime.h to WebKit using Ken's copy-o-matic mechanism.
      
      	Made npapi.h, npruntime.h, and npfunctions.h SPI.  With a bit
      	more consideration they will become API.  They will also eventually be made
      	available for other platforms/vendors are mozilla.org.
      
              Reviewed by Ken.
      
              * Plugins.subproj/WebBaseNetscapePluginStream.h:
              * Plugins.subproj/WebBaseNetscapePluginStream.m:
              (-[WebBaseNetscapePluginStream dealloc]):
              (-[WebBaseNetscapePluginStream startStreamWithURL:expectedContentLength:lastModifiedDate:MIMEType:]):
              * Plugins.subproj/WebBaseNetscapePluginView.h:
              * Plugins.subproj/WebNetscapePluginPackage.h:
              * Plugins.subproj/WebNetscapePluginPackage.m:
              (-[WebNetscapePluginPackage load]):
              * Plugins.subproj/npapi.h:
              * Plugins.subproj/npruntime.h: Added.
              * WebKit.pbproj/project.pbxproj:
              * copy-webcore-files-to-webkit:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      06184374
  28. 16 Nov, 2003 1 commit
    • darin's avatar
      Reviewed by John. · 2137ddbb
      darin authored
              - fixes 3457162 -- selecting text during a page load that blows the text field away causes a crash
              - fixes 3160035 -- crash or hang if you hold down a button while "go to about:blank soon" test runs
              - without causing 3484608 -- REGRESSION: Flash broken at http://www.macromedia.com/
      
              The WebKit part of this fix is making setDefersCallbacks: work. It had succumbed to bit rot.
              This has a side effect of not considering a page load done until all the plug-in streams are loaded.
              If that's not a good idea, we'll have to keep two separate lists in WebDataSource.
      
              * WebView.subproj/WebBaseResourceHandleDelegate.m: (-[WebBaseResourceHandleDelegate setDataSource:]):
              Set the defersCallbacks state from the WebView here so that clients don't have to do it.
      
              * WebView.subproj/WebDataSource.m: (-[WebDataSource _addSubresourceClient:]): Remove call to
              set the defersCallbacks state on the subresource client, because the above change obviates it.
              (the client/delegate terminology makes it confusing, but it's a subclass). Also loosen the type
              so we can call this on clients for plug-in streams too.
              (-[WebDataSource _removeSubresourceClient:]): Loosen type here too.
              (-[WebDataSource _defersCallbacksChanged]): And here.
              * WebView.subproj/WebDataSourcePrivate.h: Loosen type of subresource client so we can pass in the
              delegates for plug-in streams too.
      
              * WebView.subproj/WebMainResourceClient.h: Added an _initialRequest field so we can defer the very
              first callback, which does not rely on NSURLConnection.
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient dealloc]): Release the initial request.
              (-[WebMainResourceClient loadWithRequestNow:]): Moved the guts of loadWithRequest in here; to be
              used when the request is no longer deferred. Also removed the code to call setDefersCallbacks:
              on the connection, and assert that we are only called when callbacks are not deferred. Because
              the very first callback was not deferred, we would end up calling setDefersCallbacks:NO on the
              WebView, so nothing would be deferred.
              (-[WebMainResourceClient loadWithRequest:]): If callbacks are not deferred, then call the
              loadWithRequestNow: method, otherwise simply store the request in _initialRequest.
              (-[WebMainResourceClient setDefersCallbacks:]): If there is an _initialRequest and we are
              ceasing deferral of callbacks, then call the loadWithRequestNow: method.
      
              * Plugins.subproj/WebNetscapePluginStream.m:
              (-[WebNetscapePluginStream start]): Call _addSubresourceClient, and then _removeSubresourceClient
              if the load fails to even start.
              (-[WebNetscapePluginConnectionDelegate connectionDidFinishLoading:]): Call _removeSubresourceClient.
              (-[WebNetscapePluginConnectionDelegate connection:didFailWithError:]): Call _removeSubresourceClient.
      
              * Plugins.subproj/WebBaseNetscapePluginStream.h: Removed unneeded import.
              * Plugins.subproj/WebPluginDatabase.m: Add import needed now that WebBaseNetscapePluginStream.h
              imports less than before.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2137ddbb
  29. 20 Oct, 2003 1 commit
    • cblu's avatar
      Fixed: <rdar://problem/3457627>: empty Flash plugin at tvguide.com · 322dc458
      cblu authored
      	Fixed issues with plug-in stream error handling.
      	Improved plug-in logging.
      
              Reviewed by kocienda.
      
              * Misc.subproj/WebKitLogging.h: added WebKitLogPluginEvents
              * Misc.subproj/WebKitLogging.m:
              * Plugins.subproj/WebBaseNetscapePluginStream.h:
              * Plugins.subproj/WebBaseNetscapePluginStream.m:
              (-[WebBaseNetscapePluginStream startStreamWithURL:expectedContentLength:lastModifiedDate:MIMEType:]): improved logging
              (-[WebBaseNetscapePluginStream destroyStream]): improved logging
              (-[WebBaseNetscapePluginStream destroyStreamWithFailingReason:]): renamed from cancelWithReason to avoid confusion
              (-[WebBaseNetscapePluginStream receivedError:]): calls destroyStreamWithFailingReason after determining a reason from the NSError
              (-[WebBaseNetscapePluginStream cancelWithReason:]): calls destroyStreamWithFailingReason, this method is overriden by subclasses to cancel the actual load
              (-[WebBaseNetscapePluginStream finishedLoadingWithData:]): call destroyStreamWithFailingReason, not cancelWithReason because the loaded has already ended here
              (-[WebBaseNetscapePluginStream deliverData]): improved logging
              * Plugins.subproj/WebBaseNetscapePluginView.m:
              (-[WebBaseNetscapePluginView sendActivateEvent:]): use even logging
              (-[WebBaseNetscapePluginView sendUpdateEvent]): ditto
              (-[WebBaseNetscapePluginView becomeFirstResponder]): ditto
              (-[WebBaseNetscapePluginView resignFirstResponder]): ditto
              (-[WebBaseNetscapePluginView mouseDown:]): ditto
              (-[WebBaseNetscapePluginView mouseUp:]): ditto
              (-[WebBaseNetscapePluginView mouseEntered:]): ditto
              (-[WebBaseNetscapePluginView mouseExited:]): ditto
              (TSMEventHandler): ditto
              (-[WebBaseNetscapePluginView destroyStream:reason:]): call cancelWithReason so the reason is passed back to the plug-in
              * Plugins.subproj/WebNetscapePluginDocumentView.m:
              (-[WebNetscapePluginDocumentView setDataSource:]): tweak
              * Plugins.subproj/WebNetscapePluginRepresentation.m:
              (-[WebNetscapePluginRepresentation receivedError:withDataSource:]): call receivedError
              (-[WebNetscapePluginRepresentation cancelWithReason:]): override, cancel the load, call super
              * Plugins.subproj/WebNetscapePluginStream.m:
              (-[WebNetscapePluginStream cancelWithReason:]): override, cancel the load, call super
              (-[WebNetscapePluginConnectionDelegate connection:didReceiveResponse:]): be sure to call the stream before calling super because the stream can be cleared out when calling super
              (-[WebNetscapePluginConnectionDelegate connection:didReceiveData:lengthReceived:]): ditto
              (-[WebNetscapePluginConnectionDelegate connectionDidFinishLoading:]): ditto
              (-[WebNetscapePluginConnectionDelegate connection:didFailWithError:]): ditto
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      322dc458