diff --git a/mozilla/webshell/embed/ActiveX/MozillaBrowser.cpp b/mozilla/webshell/embed/ActiveX/MozillaBrowser.cpp index 5e5566a66a1..dcd84058fc3 100644 --- a/mozilla/webshell/embed/ActiveX/MozillaBrowser.cpp +++ b/mozilla/webshell/embed/ActiveX/MozillaBrowser.cpp @@ -38,15 +38,11 @@ static const TCHAR *c_szUninitialized = _T("Method called while control is unini RETURN_ERROR(c_szUninitialized, E_UNEXPECTED); - extern "C" void NS_SetupRegistry(); -static const std::string c_szPrefsFile = "prefs50.js"; static const std::string c_szPrefsHomePage = "browser.startup.homepage"; static const std::string c_szDefaultPage = "resource:/res/MozillaControl.html"; -BOOL CMozillaBrowser::m_bRegistryInitialized = FALSE; - class CMozDir { TCHAR m_szOldDir[1024]; @@ -73,6 +69,8 @@ public: } }; +BOOL CMozillaBrowser::m_bRegistryInitialized = FALSE; + ///////////////////////////////////////////////////////////////////////////// // CMozillaBrowser @@ -2098,6 +2096,14 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::get_RegisterAsDropTarget(VARIANT_BOOL } + +static BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam) +{ + ::RevokeDragDrop(hwnd); + return TRUE; +} + + HRESULT STDMETHODCALLTYPE CMozillaBrowser::put_RegisterAsDropTarget(VARIANT_BOOL bRegister) { NG_TRACE_METHOD(CMozillaBrowser::put_RegisterAsDropTarget); @@ -2137,6 +2143,11 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::put_RegisterAsDropTarget(VARIANT_BOOL pDropTarget->Release(); } + + // Now revoke any child window drop targets and pray they aren't + // reset by the layout engine. + + ::EnumChildWindows(m_hWnd, EnumChildProc, (LPARAM) this); } } else diff --git a/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp b/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp index 930ed54def2..74780971936 100644 --- a/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp +++ b/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp @@ -112,14 +112,25 @@ CWebShellContainer::MoveTo(PRInt32 aX, PRInt32 aY) NS_IMETHODIMP -CWebShellContainer::SizeWindowTo(PRInt32 aWidth, PRInt32 aHeight) +CWebShellContainer::SizeTo(PRInt32 aWidth, PRInt32 aHeight) { + NG_TRACE_METHOD(CWebShellContainer::SizeTo); return NS_OK; } + +NS_IMETHODIMP +CWebShellContainer::SizeWindowTo(PRInt32 aWidth, PRInt32 aHeight) +{ + NG_TRACE_METHOD(CWebShellContainer::SizeWindowTo); + return NS_OK; +} + + NS_IMETHODIMP CWebShellContainer::SizeContentTo(PRInt32 aWidth, PRInt32 aHeight) { + NG_TRACE_METHOD(CWebShellContainer::SizeContentTo); return NS_OK; } @@ -132,6 +143,16 @@ CWebShellContainer::GetContentBounds(nsRect& aResult) } + + +NS_IMETHODIMP +CWebShellContainer::GetBounds(nsRect& aResult) +{ + NG_TRACE_METHOD(CWebShellContainer::GetBounds); + return NS_OK; +} + + NS_IMETHODIMP CWebShellContainer::GetWindowBounds(nsRect& aResult) { @@ -143,6 +164,7 @@ CWebShellContainer::GetWindowBounds(nsRect& aResult) NS_IMETHODIMP CWebShellContainer::IsIntrinsicallySized(PRBool& aResult) { + NG_TRACE_METHOD(CWebShellContainer::IsIntrinsicallySized); aResult = PR_FALSE; return NS_OK; } diff --git a/mozilla/webshell/embed/ActiveX/WebShellContainer.h b/mozilla/webshell/embed/ActiveX/WebShellContainer.h index f74744b9de1..ab5414edb96 100644 --- a/mozilla/webshell/embed/ActiveX/WebShellContainer.h +++ b/mozilla/webshell/embed/ActiveX/WebShellContainer.h @@ -48,16 +48,14 @@ public: // nsIBrowserWindow NS_IMETHOD Init(nsIAppShell* aAppShell, nsIPref* aPrefs, const nsRect& aBounds, PRUint32 aChromeMask, PRBool aAllowPlugins = PR_TRUE); NS_IMETHOD MoveTo(PRInt32 aX, PRInt32 aY); - + NS_IMETHOD SizeTo(PRInt32 aWidth, PRInt32 aHeight); + NS_IMETHOD GetContentBounds(nsRect& aResult); + NS_IMETHOD GetBounds(nsRect& aResult); + NS_IMETHOD GetWindowBounds(nsRect& aResult); + NS_IMETHOD IsIntrinsicallySized(PRBool& aResult); NS_IMETHOD SizeWindowTo(PRInt32 aWidth, PRInt32 aHeight); NS_IMETHOD SizeContentTo(PRInt32 aWidth, PRInt32 aHeight); - - NS_IMETHOD GetContentBounds(nsRect& aResult); - NS_IMETHOD GetWindowBounds(nsRect& aResult); - NS_IMETHOD IsIntrinsicallySized(PRBool& aResult); NS_IMETHOD ShowAfterCreation(); - - NS_IMETHOD Show(); NS_IMETHOD Hide(); NS_IMETHOD Close();