Bug 666684 - Fix build warnings in embedding/browser/webBrowser; r=bz

This commit is contained in:
Ms2ger 2011-06-28 12:45:50 +02:00
parent e42980dbde
commit 6a0e5995a2
2 changed files with 11 additions and 5 deletions

View File

@ -494,7 +494,9 @@ NS_IMETHODIMP nsWebBrowser::SetItemType(PRInt32 aItemType)
NS_ENSURE_TRUE((aItemType == typeContentWrapper || aItemType == typeChromeWrapper), NS_ERROR_FAILURE);
mContentType = aItemType;
if (mDocShellAsItem)
mDocShellAsItem->SetItemType(mContentType == typeChromeWrapper ? typeChrome : typeContent);
mDocShellAsItem->SetItemType(mContentType == typeChromeWrapper
? static_cast<PRInt32>(typeChrome)
: static_cast<PRInt32>(typeContent));
return NS_OK;
}
@ -804,7 +806,8 @@ NS_IMETHODIMP nsWebBrowser::SetProperty(PRUint32 aId, PRUint32 aValue)
case nsIWebBrowserSetup::SETUP_IS_CHROME_WRAPPER:
{
NS_ENSURE_TRUE((aValue == PR_TRUE || aValue == PR_FALSE), NS_ERROR_INVALID_ARG);
SetItemType(aValue ? typeChromeWrapper : typeContentWrapper);
SetItemType(aValue ? static_cast<PRInt32>(typeChromeWrapper)
: static_cast<PRInt32>(typeContentWrapper));
}
break;
default:

View File

@ -944,9 +944,12 @@ nsWindowWatcher::OpenWindowJSInternal(nsIDOMWindow *aParent,
}
}
newDocShell->LoadURI(uriToLoad, loadInfo,
windowIsNew ? nsIWebNavigation::LOAD_FLAGS_FIRST_LOAD :
nsIWebNavigation::LOAD_FLAGS_NONE, PR_TRUE);
newDocShell->LoadURI(uriToLoad,
loadInfo,
windowIsNew
? static_cast<PRUint32>(nsIWebNavigation::LOAD_FLAGS_FIRST_LOAD)
: static_cast<PRUint32>(nsIWebNavigation::LOAD_FLAGS_NONE),
PR_TRUE);
}
// Copy the current session storage for the current domain.