Remove refcounting version of nsIPresShell::GetPresContext. Bug 253889, r+sr=roc.
git-svn-id: svn://10.0.0.236/trunk@161072 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -547,8 +547,8 @@ nsTextInputSelectionImpl::RepaintSelection(PRInt16 type)
|
||||
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShellWeak);
|
||||
if (presShell)
|
||||
{
|
||||
nsCOMPtr<nsPresContext> context;
|
||||
if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context)
|
||||
nsPresContext *context = presShell->GetPresContext();
|
||||
if (context)
|
||||
{
|
||||
return mFrameSelection->RepaintSelection(context, type);
|
||||
}
|
||||
@@ -2796,13 +2796,6 @@ nsTextControlFrame::FireOnInput()
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPresContext> context;
|
||||
presShell->GetPresContext(getter_AddRefs(context));
|
||||
NS_ASSERTION(context, "No pres context");
|
||||
if (!context) {
|
||||
return;
|
||||
}
|
||||
|
||||
presShell->HandleEventWithTarget(&event, nsnull, mContent,
|
||||
NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
@@ -2840,9 +2833,7 @@ nsTextControlFrame::FireOnChange()
|
||||
nsWeakPtr &shell = mTextSelImpl->GetPresShell();
|
||||
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(shell);
|
||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsPresContext> context;
|
||||
if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context)
|
||||
return presShell->HandleEventWithTarget(&event, nsnull, mContent, NS_EVENT_FLAG_INIT, &status);
|
||||
return presShell->HandleEventWithTarget(&event, nsnull, mContent, NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user