Commit 65861942 authored by cblu's avatar cblu

Minor clean-up, logging and more error checking in plug-in code.

        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream setResponse:]):
        (-[WebBaseNetscapePluginStream receivedData:]):
        (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
        * Plugins.subproj/npapi.m:
        (NPN_UserAgent):
        (NPN_MemFree):
        (NPN_MemFlush):
        (NPN_ReloadPlugins):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1a208841
2002-11-20 Chris Blumenberg <cblu@apple.com>
Minor clean-up, logging and more error checking in plug-in code.
* Plugins.subproj/WebBaseNetscapePluginStream.m:
(-[WebBaseNetscapePluginStream setResponse:]):
(-[WebBaseNetscapePluginStream receivedData:]):
(-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
* Plugins.subproj/npapi.m:
(NPN_UserAgent):
(NPN_MemFree):
(NPN_MemFlush):
(NPN_ReloadPlugins):
2002-11-20 Chris Blumenberg <cblu@apple.com>
Fixed: 3061174 - javascript: URLs sent by plugins don't work
......@@ -68,7 +82,8 @@
Real fix for: 3104183 - Assert loading www.louisvuitton.com
Since we don't consider plug-in content as a subresource, attaching plug-in streams to the datasource has no affect on the loading state of the datasource. Both stopLoading on WebFrame and _stopLoading datasource, would not stop plug-ins streams after the data source was done loading. Because of this, I've decided to not keep a list of plug-in streams attached to the data source and pulled my previous change. To fix this bug, WebBaseResourceHandleDelegate now retains the controller.
Since we don't consider plug-in content as a subresource, attaching plug-in streams to the datasource has no affect on the loading state of the datasource. Both stopLoading on WebFrame and _stopLoading datasource, would not stop plug-ins streams after th
e data source was done loading. Because of this, I've decided to not keep a list of plug-in streams attached to the data source and pulled my previous change. To fix this bug, WebBaseResourceHandleDelegate now retains the controller.
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream start]):
......@@ -4888,7 +4903,8 @@
2002-09-30 Chris Blumenberg <cblu@apple.com>
A ton o' plugin view clean-up and arch changes. Turned WebPluginView into WebBaseNetscapePluginView. New classes WebNetscapePluginEmbeddedView and WebNetscapePluginDocumentView are subclasses of WebBaseNetscapePluginView. WebNetscapePluginDocumentView handles non-HTML plug-in content and WebNetscapePluginEmbeddedView is the WebHTMLView subview.
A ton o' plugin view clean-up and arch changes. Turned WebPluginView into WebBaseNetscapePluginView. New classes WebNetscapePluginEmbeddedView and WebNetscapePluginDocumentView are subclasses of WebBaseNetscapePluginView. WebNetscapePluginDocumentView ha
ndles non-HTML plug-in content and WebNetscapePluginEmbeddedView is the WebHTMLView subview.
Found that we leak the world on complex pages with plug-ins such as macromedia.com and marvel.com when closing the window. Still need to figure this out.
......@@ -5059,7 +5075,8 @@
Fixed: 2978258 - quake3arena.com sends me to the flash=false site
The page has a flash plugin that once loaded, requests the flash=true page. If the plugin doesn't load, the meta refresh tag to the flash=false page fires after 3 seconds. This is how this site's flash detection works.
The reason this doesn't work for us is because the flash movie is at the bottom of the page. Plugins don't start until the initial drawRect. Since the movie is at the bottom of the page and out of site, the plugin never gets the drawRect and thus, never starts. We now start plug-ins when they are added to the window.
The reason this doesn't work for us is because the flash movie is at the bottom of the page. Plugins don't start until the initial drawRect. Since the movie is at the bottom of the page and out of site, the plugin never gets the drawRect and thus, never
starts. We now start plug-ins when they are added to the window.
Fixed: 3062224 - context menu includes "Download Item to Disk" for mailto links
......
2002-11-20 Chris Blumenberg <cblu@apple.com>
Minor clean-up, logging and more error checking in plug-in code.
* Plugins.subproj/WebBaseNetscapePluginStream.m:
(-[WebBaseNetscapePluginStream setResponse:]):
(-[WebBaseNetscapePluginStream receivedData:]):
(-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
* Plugins.subproj/npapi.m:
(NPN_UserAgent):
(NPN_MemFree):
(NPN_MemFlush):
(NPN_ReloadPlugins):
2002-11-20 Chris Blumenberg <cblu@apple.com>
Fixed: 3061174 - javascript: URLs sent by plugins don't work
......@@ -68,7 +82,8 @@
Real fix for: 3104183 - Assert loading www.louisvuitton.com
Since we don't consider plug-in content as a subresource, attaching plug-in streams to the datasource has no affect on the loading state of the datasource. Both stopLoading on WebFrame and _stopLoading datasource, would not stop plug-ins streams after the data source was done loading. Because of this, I've decided to not keep a list of plug-in streams attached to the data source and pulled my previous change. To fix this bug, WebBaseResourceHandleDelegate now retains the controller.
Since we don't consider plug-in content as a subresource, attaching plug-in streams to the datasource has no affect on the loading state of the datasource. Both stopLoading on WebFrame and _stopLoading datasource, would not stop plug-ins streams after th
e data source was done loading. Because of this, I've decided to not keep a list of plug-in streams attached to the data source and pulled my previous change. To fix this bug, WebBaseResourceHandleDelegate now retains the controller.
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream start]):
......@@ -4888,7 +4903,8 @@
2002-09-30 Chris Blumenberg <cblu@apple.com>
A ton o' plugin view clean-up and arch changes. Turned WebPluginView into WebBaseNetscapePluginView. New classes WebNetscapePluginEmbeddedView and WebNetscapePluginDocumentView are subclasses of WebBaseNetscapePluginView. WebNetscapePluginDocumentView handles non-HTML plug-in content and WebNetscapePluginEmbeddedView is the WebHTMLView subview.
A ton o' plugin view clean-up and arch changes. Turned WebPluginView into WebBaseNetscapePluginView. New classes WebNetscapePluginEmbeddedView and WebNetscapePluginDocumentView are subclasses of WebBaseNetscapePluginView. WebNetscapePluginDocumentView ha
ndles non-HTML plug-in content and WebNetscapePluginEmbeddedView is the WebHTMLView subview.
Found that we leak the world on complex pages with plug-ins such as macromedia.com and marvel.com when closing the window. Still need to figure this out.
......@@ -5059,7 +5075,8 @@
Fixed: 2978258 - quake3arena.com sends me to the flash=false site
The page has a flash plugin that once loaded, requests the flash=true page. If the plugin doesn't load, the meta refresh tag to the flash=false page fires after 3 seconds. This is how this site's flash detection works.
The reason this doesn't work for us is because the flash movie is at the bottom of the page. Plugins don't start until the initial drawRect. Since the movie is at the bottom of the page and out of site, the plugin never gets the drawRect and thus, never starts. We now start plug-ins when they are added to the window.
The reason this doesn't work for us is because the flash movie is at the bottom of the page. Plugins don't start until the initial drawRect. Since the movie is at the bottom of the page and out of site, the plugin never gets the drawRect and thus, never
starts. We now start plug-ins when they are added to the window.
Fixed: 3062224 - context menu includes "Download Item to Disk" for mailto links
......
......@@ -69,8 +69,8 @@ - (void)setResponse:(WebResourceResponse *)r
LOG(Plugins, "NPP_NewStream: %d %@", npErr, URL);
if (npErr != NPERR_NO_ERROR) {
ERROR("NPP_NewStream failed with error: %d", npErr);
stream.ndata = nil;
// FIXME: Need to properly handle this error.
return;
}
......@@ -95,7 +95,7 @@ - (void)setResponse:(WebResourceResponse *)r
- (void)receivedData:(NSData *)data
{
if(![plugin isLoaded]){
if(![plugin isLoaded] || !stream.ndata) {
return;
}
......@@ -131,7 +131,7 @@ - (void)receivedError:(NPError)reason
- (void)finishedLoadingWithData:(NSData *)data
{
if(![plugin isLoaded]){
if(![plugin isLoaded] || !stream.ndata) {
return;
}
......
......@@ -13,7 +13,7 @@
const char* NPN_UserAgent(NPP instance)
{
LOG(Plugins, "NPN_UserAgent");
return "IE";
return "Microsoft Internet Explorer";
}
void* NPN_MemAlloc(UInt32 size)
......@@ -27,19 +27,17 @@ void NPN_MemFree(void* ptr)
{
//LOG(Plugins, "NPN_MemFree");
free(ptr);
}
UInt32 NPN_MemFlush(UInt32 size)
{
LOG(Plugins, "NPN_MemFlush");
return 0;
return size;
}
void NPN_ReloadPlugins(NPBool reloadPages)
{
LOG(Plugins, "NPN_ReloadPlugins");
}
NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment