Change all callers of nsIPresContext::GetShell() to use the non-refcounting versions. Most callers now use PresShell(), a few that were checking for null conditions are using GetPresShell() -- this will be remedied once we can ensure that a prescontext never has a null pres shell. Bug 227690, r+sr=bzbarsky.

This commit is contained in:
bryner%brianryner.com 2005-08-20 07:13:36 +00:00
Родитель 716ffc1dd7
Коммит c89670f238
2 изменённых файлов: 4 добавлений и 12 удалений

Просмотреть файл

@ -756,12 +756,8 @@ nsNativeThemeMac::ThemeSupportsWidget(nsIPresContext* aPresContext, nsIFrame* aF
return PR_FALSE;
#endif
if (aPresContext) {
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
if (!shell->IsThemeSupportEnabled())
return PR_FALSE;
}
if (aPresContext && !aPresContext->PresShell()->IsThemeSupportEnabled())
return PR_FALSE;
PRBool retVal = PR_FALSE;

Просмотреть файл

@ -1152,12 +1152,8 @@ nsNativeThemeWin::ThemeSupportsWidget(nsIPresContext* aPresContext,
// XXXdwh We can go even further and call the API to ask if support exists for
// specific widgets.
if (aPresContext) {
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
if (!shell->IsThemeSupportEnabled())
return PR_FALSE;
}
if (aPresContext && !aPresContext->PresShell()->IsThemeSupportEnabled())
return PR_FALSE;
HANDLE theme = NULL;
if (aWidgetType == NS_THEME_CHECKBOX_CONTAINER)