зеркало из https://github.com/mozilla/pjs.git
Bug 337607, [@ nsEventStateManager::HandleAccessKey], r+sr=bz
This commit is contained in:
Родитель
db51c95d20
Коммит
56113f15e8
|
@ -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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче