Fixing bug 188938. Adding the ability for plugins to participate in form submission. r=bzbarsky@mit.edu, sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@170445 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -764,7 +764,7 @@ nsInstanceStream::~nsInstanceStream()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMPL_ISUPPORTS3(ns4xPluginInstance, nsIPluginInstance, nsIScriptablePlugin,
|
||||
nsINPRuntimePlugin)
|
||||
nsIPluginInstanceInternal)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1545,3 +1545,22 @@ ns4xPluginInstance::GetJSObject(JSContext *cx)
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPluginInstance::GetFormValue(nsAString& aValue)
|
||||
{
|
||||
aValue.Truncate();
|
||||
|
||||
char *value = nsnull;
|
||||
nsresult rv = GetValueInternal(NPPVformValue, &value);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && value) {
|
||||
CopyUTF8toUTF16(value, aValue);
|
||||
|
||||
// NPPVformValue allocates with NPN_MemAlloc(), which uses
|
||||
// nsMemory.
|
||||
nsMemory::Free(value);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user