mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 509124 Chrome flags are never set on unparented XUL windows r=jst
This commit is contained in:
parent
f393e89d37
commit
cad0564597
@ -295,7 +295,7 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent,
|
||||
{
|
||||
*aResult = nsnull;
|
||||
|
||||
nsRefPtr<nsWebShellWindow> window = new nsWebShellWindow();
|
||||
nsRefPtr<nsWebShellWindow> window = new nsWebShellWindow(aChromeMask);
|
||||
NS_ENSURE_TRUE(window, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
nsWidgetInitData widgetInitData;
|
||||
|
@ -118,7 +118,8 @@ static NS_DEFINE_CID(kWindowCID, NS_WINDOW_CID);
|
||||
|
||||
#define SIZE_PERSISTENCE_TIMEOUT 500 // msec
|
||||
|
||||
nsWebShellWindow::nsWebShellWindow() : nsXULWindow()
|
||||
nsWebShellWindow::nsWebShellWindow(PRUint32 aChromeFlags)
|
||||
: nsXULWindow(aChromeFlags)
|
||||
{
|
||||
mSPTimerLock = PR_NewLock();
|
||||
}
|
||||
@ -224,7 +225,7 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
|
||||
}
|
||||
|
||||
if (nsnull != aUrl) {
|
||||
nsCAutoString tmpStr;
|
||||
nsCString tmpStr;
|
||||
|
||||
rv = aUrl->GetSpec(tmpStr);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
@ -56,7 +56,7 @@ class nsWebShellWindow : public nsXULWindow,
|
||||
public nsIWebProgressListener
|
||||
{
|
||||
public:
|
||||
nsWebShellWindow();
|
||||
nsWebShellWindow(PRUint32 aChromeFlags);
|
||||
|
||||
// nsISupports interface...
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -130,7 +130,7 @@ DevToCSSPixels(PRInt32 aPixels, PRInt32 aAppPerDev)
|
||||
//*** nsXULWindow: Object Management
|
||||
//*****************************************************************************
|
||||
|
||||
nsXULWindow::nsXULWindow()
|
||||
nsXULWindow::nsXULWindow(PRUint32 aChromeFlags)
|
||||
: mChromeTreeOwner(nsnull),
|
||||
mContentTreeOwner(nsnull),
|
||||
mPrimaryContentTreeOwner(nsnull),
|
||||
@ -147,7 +147,7 @@ nsXULWindow::nsXULWindow()
|
||||
mBlurSuppressionLevel(0),
|
||||
mPersistentAttributesDirty(0),
|
||||
mPersistentAttributesMask(0),
|
||||
mChromeFlags(nsIWebBrowserChrome::CHROME_ALL),
|
||||
mChromeFlags(aChromeFlags),
|
||||
// best guess till we have a widget
|
||||
mAppPerDev(nsPresContext::AppUnitsPerCSSPixel())
|
||||
{
|
||||
@ -1704,8 +1704,6 @@ NS_IMETHODIMP nsXULWindow::CreateNewChromeWindow(PRInt32 aChromeFlags,
|
||||
|
||||
NS_ENSURE_TRUE(newWindow, NS_ERROR_FAILURE);
|
||||
|
||||
newWindow->SetChromeFlags(aChromeFlags);
|
||||
|
||||
*_retval = newWindow;
|
||||
NS_ADDREF(*_retval);
|
||||
|
||||
@ -1755,8 +1753,6 @@ NS_IMETHODIMP nsXULWindow::CreateNewContentWindow(PRInt32 aChromeFlags,
|
||||
|
||||
NS_ENSURE_TRUE(newWindow, NS_ERROR_FAILURE);
|
||||
|
||||
newWindow->SetChromeFlags(aChromeFlags);
|
||||
|
||||
// Specify that we want the window to remain locked until the chrome has loaded.
|
||||
nsXULWindow *xulWin = static_cast<nsXULWindow*>
|
||||
(static_cast<nsIXULWindow*>
|
||||
|
@ -104,7 +104,7 @@ protected:
|
||||
PAD_SIZE = 0x4
|
||||
};
|
||||
|
||||
nsXULWindow();
|
||||
nsXULWindow(PRUint32 aChromeFlags);
|
||||
virtual ~nsXULWindow();
|
||||
|
||||
NS_IMETHOD EnsureChromeTreeOwner();
|
||||
|
Loading…
Reference in New Issue
Block a user