Make click+hold right-click menu work again on Mac (bug 193799), r=bryner/saari, sr=jst

git-svn-id: svn://10.0.0.236/trunk@138637 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jkeiser%netscape.com
2003-02-27 22:59:08 +00:00
parent c2eceb6adf
commit f50df1d552

View File

@@ -3726,14 +3726,20 @@ nsEventStateManager::GetEventTargetContent(nsEvent* aEvent, nsIContent** aConten
return NS_OK;
}
*aContent = nsnull;
nsCOMPtr<nsIPresShell> presShell;
mPresContext->GetShell(getter_AddRefs(presShell));
if (presShell) {
presShell->GetEventTargetContent(aEvent, aContent);
return NS_OK;
}
*aContent = nsnull;
// Some events here may set mCurrentTarget but not set the corresponding
// event target in the PresShell.
if (!*aContent && mCurrentTarget) {
mCurrentTarget->GetContentForEvent(mPresContext, aEvent, aContent);
}
return NS_OK;
}