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
parent 231fe7a8c6
commit d2822a554e
2 changed files with 4 additions and 12 deletions

View File

@ -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;

View File

@ -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)