r=av, sean@beatnik.com
bug=50547
This change allows the plugin to have a greater degree of control over
the plugin lifecycle. This change makes it possible for the plugin to
tell mozilla:
1. Whether or not they want to allow the browser to cache their
instance. Default is yes, do allow the browser to cache their instance.
2. If they answer no to 1, that is, no the plugin does not want the
browser to cache their instance, do you want the shutdown calls to be:
a.
inst->SetWindow(nsnull);
inst->Stop();
inst->Destroy();
b.
inst->Stop();
inst->Destroy();
inst->SetWindow(nsnull);
a. is the default.
Please visit the bug to see the patches:
http://bugzilla.mozilla.org/show_bug.cgi?id=50547
Detail:
This fix was requested by Stanley Ho of the Sun Java Plugin Team. A
conference call between Eric Krock, Andrei Volkov, Sun, Adobe and other
plugin vendors was used to agree on the above solution.
M modules/plugin/public/nsplugindefs.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginViewer.cpp
M layout/html/base/src/nsObjectFrame.cpp
Right now, nsIPluginManager::PostURL() has parameters for
postHeadersLength and postHeaders. However, nothing is being done with
these parameters. This bug fix utilizes these params for their intended
purpose: to allow the plugin the ability to add HTTP headers to a POST
data stream.
Important assumptions made by this fix:
* postHeadersLength is the correct length for postHeaders.
* postHeaders is a buffer of headers in the form
"HeaderName: HeaderValue\r\n"
each header, including the last, MUST be followed by "\r\n".
To affect this fix I had to modify the following files:
M docshell/base/nsDocShell.cpp
M docshell/base/nsDocShell.h
M docshell/base/nsWebShell.cpp
M modules/plugin/nglsrc/nsPluginViewer.cpp
M docshell/base/nsWebShell.h
M layout/html/base/src/nsObjectFrame.cpp
M modules/plugin/nglsrc/nsIPluginInstanceOwner.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginInstancePeer.cpp
M webshell/public/nsILinkHandler.h
Basically, it involved clearing a path so the headers arguments can make
it down to nsIPluginInstanceOwner::GetURL()'s implementation in
nsObjectFrame.cpp, where an nsIInputStream is made of the headers.
a=waterson,av
r=av,waterson
Here is what I believe to be the correct fix.
This post correspondes to the fix,
second iteration attachments.
M modules/plugin/nglsrc/nsIPluginInstanceOwner.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginInstancePeer.cpp
M modules/plugin/nglsrc/nsPluginViewer.cpp
M layout/html/base/src/nsObjectFrame.cpp
This checkin modifies nsIPluginInstanceOwner::GetURL
to have a length parameter for the post data.
r=av@netscape.com
The problem was the object frame was assuming it was at offset y=0 within it's parent frame when calculating a percent height. This is an invalid assumption.
Instead, we now measure from the top of the containing block. This still isn't 100% correct, but it is the right parent to be measuring margin from.