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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user