Remove refcounting version of nsIPresShell::GetPresContext. Bug 253889, r+sr=roc.

This commit is contained in:
bryner%brianryner.com 2006-05-17 02:38:41 +00:00
parent 60df662100
commit da31ff4189
2 changed files with 4 additions and 11 deletions

View File

@ -167,11 +167,9 @@ inFlasher::DrawElementOutline(nsIDOMElement* aElement)
if (!window) return NS_OK;
nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(window);
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
nsPresContext *presContext = presShell->GetPresContext();
float p2t;
p2t = presContext->PixelsToTwips();
float p2t = presContext->PixelsToTwips();
PRBool isFirstFrame = PR_TRUE;
nsCOMPtr<nsIRenderingContext> rcontext;

View File

@ -125,11 +125,7 @@ inLayoutUtils::GetEventStateManagerFor(nsIDOMElement *aElement)
nsIPresShell *shell = doc->GetShellAt(0);
NS_ASSERTION(shell, "No pres shell");
nsCOMPtr<nsPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
NS_ASSERTION(presContext, "No pres context");
return presContext->EventStateManager();
return shell->GetPresContext()->EventStateManager();
}
nsPoint
@ -171,8 +167,7 @@ inLayoutUtils::GetScreenOrigin(nsIDOMElement* aElement)
// Flush all pending notifications so that our frames are uptodate
doc->FlushPendingNotifications(Flush_Layout);
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
nsPresContext *presContext = presShell->GetPresContext();
if (presContext) {
nsIFrame* frame = nsnull;