Bug 337607, [@ nsEventStateManager::HandleAccessKey], r+sr=bz

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-06-29 19:57:01 +00:00
Родитель db51c95d20
Коммит 56113f15e8
1 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -1067,10 +1067,11 @@ nsEventStateManager::HandleAccessKey(nsPresContext* aPresContext,
// checking all sub docshells
nsCOMPtr<nsISupports> pcContainer = aPresContext->GetContainer();
NS_ASSERTION(pcContainer, "no container for presContext");
nsCOMPtr<nsIDocShellTreeNode> docShell(do_QueryInterface(pcContainer));
NS_ASSERTION(docShell, "no docShellTreeNode for presContext");
if (!docShell) {
NS_WARNING("no docShellTreeNode for presContext");
return;
}
PRInt32 childCount;
docShell->GetChildCount(&childCount);
@ -1112,10 +1113,11 @@ nsEventStateManager::HandleAccessKey(nsPresContext* aPresContext,
// bubble up the process to the parent docShell if necessary
if (eAccessKeyProcessingDown != aAccessKeyState && nsEventStatus_eConsumeNoDefault != *aStatus) {
nsCOMPtr<nsISupports> pcContainer = aPresContext->GetContainer();
NS_ASSERTION(pcContainer, "no container for presContext");
nsCOMPtr<nsIDocShellTreeItem> docShell(do_QueryInterface(pcContainer));
NS_ASSERTION(docShell, "no docShellTreeItem for presContext");
if (!docShell) {
NS_WARNING("no docShellTreeNode for presContext");
return;
}
nsCOMPtr<nsIDocShellTreeItem> parentShellItem;
docShell->GetParent(getter_AddRefs(parentShellItem));