Bug 366500 Crash hitting OK in dialog [@ nsQueryInterface::operator] called from [@ nsAccessible::Shutdown]
patch by Evan.yan at sun.com r=aaronleventhal git-svn-id: svn://10.0.0.236/trunk@218656 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -505,7 +505,16 @@ void nsRootAccessible::FireCurrentFocusEvent()
|
||||
NS_LITERAL_STRING("Events"),
|
||||
getter_AddRefs(event))) &&
|
||||
NS_SUCCEEDED(event->InitEvent(NS_LITERAL_STRING("focus"), PR_TRUE, PR_TRUE))) {
|
||||
HandleEventWithTarget(event, focusedNode);
|
||||
// Get the target node we really want for the event.
|
||||
nsIAccessibilityService* accService = GetAccService();
|
||||
if (accService) {
|
||||
nsCOMPtr<nsIDOMNode> targetNode;
|
||||
accService->GetRelevantContentNodeFor(focusedNode,
|
||||
getter_AddRefs(targetNode));
|
||||
if (targetNode) {
|
||||
HandleEventWithTarget(event, targetNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user