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
2003-12-21 05:36:36 +00:00
parent 003baddf75
commit 640685cbe9
140 changed files with 729 additions and 1485 deletions
+2 -5
View File
@@ -136,10 +136,8 @@ nsHTMLButtonControlFrame::Init(nsIPresContext* aPresContext,
flags |= NS_BLOCK_SHRINK_WRAP;
}
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
nsIFrame* areaFrame;
NS_NewAreaFrame(shell, &areaFrame, flags);
NS_NewAreaFrame(aPresContext->PresShell(), &areaFrame, flags);
mFrames.SetFrames(areaFrame);
// Resolve style and initialize the frame
@@ -271,8 +269,7 @@ void
nsHTMLButtonControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
{
if (aPresContext) {
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
nsIPresShell *presShell = aPresContext->GetPresShell();
if (presShell) {
presShell->ScrollFrameIntoView(this,
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);