Fix browsing to newly opened popup windows. b=188055 r=danm@netscape.com sr=blizzard@mozilla.org

This commit is contained in:
locka%iol.ie 2003-04-02 11:09:42 +00:00
parent b4a46544cf
commit cd2ccfc3ce
2 changed files with 12 additions and 3 deletions

View File

@ -174,7 +174,7 @@ public:
if (pszTextToCopy)
{
// Don't exceed the provided buffer size
int nTextLen = wcslen(pszTextToCopy);
size_t nTextLen = wcslen(pszTextToCopy);
if (nTextLen > pCmdText->cwBuf)
{
nTextLen = pCmdText->cwBuf;

View File

@ -86,9 +86,18 @@ NS_INTERFACE_MAP_END
///////////////////////////////////////////////////////////////////////////////
// nsIInterfaceRequestor
NS_IMETHODIMP CWebBrowserContainer::GetInterface(const nsIID & uuid, void * *result)
NS_IMETHODIMP CWebBrowserContainer::GetInterface(const nsIID & aIID, void * *result)
{
return QueryInterface(uuid, result);
*result = 0;
if (aIID.Equals(NS_GET_IID(nsIDOMWindow)))
{
if (mOwner && mOwner->mWebBrowser)
{
return mOwner->mWebBrowser->GetContentDOMWindow((nsIDOMWindow **) result);
}
return NS_ERROR_NOT_INITIALIZED;
}
return QueryInterface(aIID, result);
}