mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Remove refcounting version of nsIPresShell::GetPresContext. Bug 253889, r+sr=roc.
This commit is contained in:
parent
60df662100
commit
da31ff4189
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user