r=av
r=edburns@acm.org
sr=waterson
bug= 56019
///////////////////////////////////////////////////////////////////////////////
// Currently, in the MIME type info passed in by plugin, a ';' is used as the
// separator of two MIME types, and also the sparator of a version in one MIME
// type. For example:
// "application/x-java-applet;version1.3::java(TM) plugin;application/x-java-
// applet...".
// The ambiguity of ';' causes the browser fail to parse the MIME types
// correctly.
//
// This method parses the MIME type input, and replaces the MIME type
// separators with '|' to eliminate the ambiguity of ';'. (The Windows version
// also uses '|' as the MIME type separator.)
//
// Input format: "...type[;version]:[extension]:[desecription];..."
// Output format: "...type[;version]:[extension]:[desecription]|..."
//
static void SetMIMETypeSeparator(char *minfo)
{
mozilla/odules/libpref/src/init/all.js
- Added "spellchecker.dictionary" default pref and removed old 4.x spellchecker prefs.
mozilla/editor/base/nsEditorShell.cpp
- Added code to InitSpellChecker() and UninitSpellChecker() to get and
set the "spellchecker.dictionary" pref.
r=brade@netscape.com sr,a=sfraser@netscape.com
a=brendan
r=edburns, scc
This checkin does three things:
1. Makes it so on Unix the user can set the env var NS600_PLUGIN_PATH to point
to a directory that will be used as the location for searching for plugins.
2. Removes nsPluginsDirUNIX.cpp and replaces it with nsPluginsDirUnix.cpp
3. Correctly formats nsPluginsDirUnix per brendan's recommendation.
r=av
bug=52963
Tested on win32. Tested to build on win32 and solaris.
This patch fixes bug 52963, bug 52965, and bug 52973.
This patch contributed by Stanley Ho <stanley.ho@eng.sun.com>
52963: nsIPluginStreamListener::OnStartBinding isn't always called:
Added new ivar, mStartBinding:
* Set to PR_TRUE after nsIPluginInstancePeer::OnStartBinding() has
* been called. Checked in ::OnStopRequest so we can call the
* plugin's OnStartBinding if, for some reason, it has not already
* been called.
52965: Length isn't always set:
rv = channel->GetContentLength(&length);
// it's possible for the server to not send a Content-Length. We should
// still work in this case.
if (NS_FAILED(rv)) {
mPluginStreamInfo->SetLength(-1);
}
else {
mPluginStreamInfo->SetLength(length);
}
52973: nsIHTTPHeaderListener called before nsIPluginStreamListener::NewStream
This fix required rolling back Andrei Volkov's change to the signature
of nsPluginStreamListenerPeer::SetUpStreamListener(). In order to call
the plugin with the headers before the NewStream is sent, we need the
nsIChannel.
files in this fix:
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
the problem is that nsZipArchive and zlib are not thread safe.
for now, add a lock to prevent multiple threads from getting into that code
r=warren,dveditz
super-end-of-game-review=mscott
a=brendan
bug=49525
This simple fix just adds parameters to an existing method in an XPCOM
safe way, by defining a new method at the end of the interface
definition with the additional parameters.
Original method:
NS_IMETHOD
GetURL(nsISupports* pluginInst,
const char* url,
const char* target = NULL,
nsIPluginStreamListener* streamListener = NULL,
const char* altHost = NULL,
const char* referrer = NULL,
PRBool forceJSEnabled = PR_FALSE) = 0;
New method:
NS_IMETHOD
GetURLWithHeaders(nsISupports* pluginInst,
const char* url,
const char* target = NULL,
nsIPluginStreamListener* streamListener = NULL,
const char* altHost = NULL,
const char* referrer = NULL,
PRBool forceJSEnabled = PR_FALSE,
PRUint32 getHeadersLength = 0,
const char* getHeaders = NULL) = 0;
I have modified nsPluginHostImpl.h to include this new method, and
modified nsPluginHostImpl.cpp so that its GetURL calls GetURLWithHeaders
with null values for the last two params.
M modules/plugin/public/nsIPluginManager.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginHostImpl.h
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
r=av
bug=50811
This bug fix was suggested by Stanley Ho <stanley.ho@eng.sun.com>.
Stanley proposed we overload the meaning of the nsIPluginStreamListener
argument to nsIPluginManager::{GetURL,PostURL}() so that it also may
implement an interface for reading headers. Thus, the browser could QI
the plugin's nsIPluginStreamListener instance to this headers reading
interface and send the plugin the headers from the response.
I have implemented Stanley's above proposal. I have defined a new
interface, nsIHTTPHeaderListener.idl with one method:
/**
* Called for each HTTP Response header.
* NOTE: You must copy the values of the params.
*/
void newResponseHeader(in string headerName, in string headerValue);
To affect this fix, I have added a new private method
nsPluginStreamListenerPeer::
ReadHeadersFromChannelAndPostToListener(nsIHTTPChannel *httpChannel,
nsIHTTPHeaderListener *listener)
Then, modified nsPluginStreamListenerPeer::OnDataAvailable() to call
this method BEFORE reading the content data. However, this fix makes
two important assumptions I would like to check out:
* Assumption
* By the time nsPluginStreamListenerPeer::OnDataAvailable() gets
* called, all the headers have been read.
* Assumption:
* The return value from nsIHTTPHeader->{GetFieldName,GetValue}()
* must be freed.
The following files are included in this fix:
A modules/plugin/public/nsIHTTPHeaderListener.idl
A modules/plugin/public/makefile.win
A modules/plugin/public/Makefile.in
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
r=av
bug=50811
This bug fix was suggested by Stanley Ho <stanley.ho@eng.sun.com>.
Stanley proposed we overload the meaning of the nsIPluginStreamListener
argument to nsIPluginManager::{GetURL,PostURL}() so that it also may
implement an interface for reading headers. Thus, the browser could QI
the plugin's nsIPluginStreamListener instance to this headers reading
interface and send the plugin the headers from the response.
I have implemented Stanley's above proposal. I have defined a new
interface, nsIHTTPHeaderListener.idl with one method:
/**
* Called for each HTTP Response header.
* NOTE: You must copy the values of the params.
*/
void newResponseHeader(in string headerName, in string headerValue);
To affect this fix, I have added a new private method
nsPluginStreamListenerPeer::
ReadHeadersFromChannelAndPostToListener(nsIHTTPChannel *httpChannel,
nsIHTTPHeaderListener *listener)
Then, modified nsPluginStreamListenerPeer::OnDataAvailable() to call
this method BEFORE reading the content data. However, this fix makes
two important assumptions I would like to check out:
* Assumption
* By the time nsPluginStreamListenerPeer::OnDataAvailable() gets
* called, all the headers have been read.
* Assumption:
* The return value from nsIHTTPHeader->{GetFieldName,GetValue}()
* must be freed.
The following files are included in this fix:
A modules/plugin/public/nsIHTTPHeaderListener.idl
A modules/plugin/public/makefile.win
A modules/plugin/public/Makefile.in
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
a=waterson
bug=51919
This fix makes it so nsIPluginManager::PostURL() works correctly in the
case of a null target and non-null streamListener.
The fix was to add parameters to NewPluginURLStream() for headers and
post data:
NS_IMETHOD
- NewPluginURLStream(const nsString& aURL, nsIPluginInstance *aInstance, nsIPluginStreamListener *aListener);
+ NewPluginURLStream(const nsString& aURL, nsIPluginInstance *aInstance,
+ nsIPluginStreamListener *aListener,
+ void *aPostData = nsnull, PRUint32 aPostDataLen = 0,
+ const char *aHeadersData = nsnull,
+ PRUint32 aHeadersDataLen = 0);
And to add a new method to correctly send the headers to the channel:
+ NS_IMETHOD
+ AddHeadersToChannel(const char *aHeadersData, PRUint32 aHeadersDataLen,
+ nsIChannel *aGenericChannel);
Files in this fix:
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginHostImpl.h