Checking in support for intrinsic sizing of chrome.
This commit is contained in:
@@ -496,9 +496,18 @@ nsAppShellService::CreateTopLevelWindow(nsIWebShellWindow *aParent,
|
||||
nsWidgetInitData widgetInitData;
|
||||
widgetInitData.mBorderStyle = eBorderStyle_window;
|
||||
|
||||
if (aInitialWidth == NS_SIZETOCONTENT ||
|
||||
aInitialHeight == NS_SIZETOCONTENT) {
|
||||
aInitialWidth = 0;
|
||||
aInitialHeight = 0;
|
||||
showWindow = PR_FALSE; // Don't show until we have the intrinsic size figured out.
|
||||
window->SetIntrinsicallySized(PR_TRUE);
|
||||
}
|
||||
|
||||
rv = window->Initialize((nsIWebShellWindow *) nsnull, mAppShell, aUrl,
|
||||
anObserver, aCallbacks,
|
||||
aInitialWidth, aInitialHeight, widgetInitData);
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
// this does the AddRef of the return value
|
||||
@@ -547,6 +556,14 @@ nsAppShellService::CreateDialogWindow(nsIWebShellWindow * aParent,
|
||||
nsWidgetInitData widgetInitData;
|
||||
widgetInitData.mBorderStyle = eBorderStyle_window;
|
||||
|
||||
if (aInitialWidth == NS_SIZETOCONTENT ||
|
||||
aInitialHeight == NS_SIZETOCONTENT) {
|
||||
aInitialWidth = 0;
|
||||
aInitialHeight = 0;
|
||||
showWindow = PR_FALSE; // Don't show until we have the intrinsic size figured out.
|
||||
window->SetIntrinsicallySized(PR_TRUE);
|
||||
}
|
||||
|
||||
rv = window->Initialize((nsIWebShellWindow *) nsnull, mAppShell, aUrl,
|
||||
anObserver, aCallbacks,
|
||||
aInitialWidth, aInitialHeight, widgetInitData);
|
||||
|
||||
Reference in New Issue
Block a user