Bug 293185 When ActiveX control plug-in is installed buttons in a flash document no longer work. patch by <VYV03354@nifty.ne.jp> r+sr=jst, a=asa

git-svn-id: svn://10.0.0.236/trunk@175837 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
masayuki%d-toybox.com
2005-07-08 14:13:32 +00:00
parent f67386e0f3
commit 10e76ef356

View File

@@ -112,6 +112,7 @@ public:
#include "nsString.h"
#include "nsNetUtil.h"
#include "nsIContent.h"
#include "nsIURI.h"
#include "nsIDocument.h"
#include "nsIDOMWindow.h"
@@ -925,6 +926,7 @@ public:
nsCOMPtr<nsIDOMWindow> mDOMWindow;
nsCOMPtr<nsIDOMDocument> mDOMDocument;
nsCOMPtr<nsIDOMElement> mDOMElement;
CComObject<IEWindow> *mWindow;
CComObject<IEBrowser> *mBrowser;
CComBSTR mURL;
@@ -942,14 +944,13 @@ public:
HRESULT Init(PluginInstanceData *pData)
{
mData = pData;
nsCOMPtr<nsIDOMElement> element;
// Get the DOM document
NPN_GetValue(mData->pPluginInstance, NPNVDOMElement,
NS_STATIC_CAST(nsIDOMElement **, getter_AddRefs(element)));
if (element)
NS_STATIC_CAST(nsIDOMElement **, getter_AddRefs(mDOMElement)));
if (mDOMElement)
{
element->GetOwnerDocument(getter_AddRefs(mDOMDocument));
mDOMElement->GetOwnerDocument(getter_AddRefs(mDOMDocument));
}
// Get the DOM window
@@ -1838,7 +1839,9 @@ END_COM_MAP()
nsAutoPopupStatePusher popupStatePusher(window,
openAllowed);
lh->OnLinkClick(nsnull, eLinkVerb_Replace,
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMElement));
lh->OnLinkClick(content, eLinkVerb_Replace,
uri, szTargetFrame ? szTargetFrame : mUseTarget);
}
}