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

View File

@@ -160,8 +160,6 @@ nsButtonBoxFrame::MouseClicked (nsIPresContext* aPresContext, nsGUIEvent* aEvent
if (disabled.Equals(NS_LITERAL_STRING("true")))
return;
nsresult rv = NS_OK;
// Execute the oncommand event handler.
nsEventStatus status = nsEventStatus_eIgnore;
nsMouseEvent event;
@@ -182,9 +180,9 @@ nsButtonBoxFrame::MouseClicked (nsIPresContext* aPresContext, nsGUIEvent* aEvent
event.widget = nsnull;
// Have the content handle the event, propagating it according to normal DOM rules.
nsCOMPtr<nsIPresShell> shell;
rv = aPresContext->GetShell(getter_AddRefs(shell));
if (NS_SUCCEEDED(rv) && shell) {
nsIPresShell *shell = aPresContext->GetPresShell();
if (shell) {
shell->HandleDOMEventWithTarget(mContent, &event, &status);
// shell may no longer be alive, don't use it here unless you keep a ref
}
}