Bug 307534. Accessibklity cache can become corrupt after get_accFocus(). r=parente, sr=jst
git-svn-id: svn://10.0.0.236/trunk@179884 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0ce78185b1
commit
b9127673b6
@ -1813,6 +1813,15 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_ASSERTION(content->GetDocument(), "Creating accessible for node with no document");
|
||||
if (!content->GetDocument()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ASSERTION(content->GetDocument() == aPresShell->GetDocument(), "Creating accessible for wrong pres shell");
|
||||
if (content->GetDocument() != aPresShell->GetDocument()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// We have a content node
|
||||
nsIFrame *frame = *aFrameHint;
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
|
||||
@ -229,10 +229,11 @@ NS_IMETHODIMP nsDocAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Return an accessible for the current global focus, which does not have to
|
||||
// be contained within the current document.
|
||||
nsCOMPtr<nsIAccessibilityService> accService =
|
||||
do_GetService("@mozilla.org/accessibilityService;1");
|
||||
return accService->GetAccessibleInWeakShell(gLastFocusedNode, mWeakShell,
|
||||
aFocusedChild);
|
||||
return accService->GetAccessibleFor(gLastFocusedNode, aFocusedChild);
|
||||
}
|
||||
|
||||
// ------- nsIAccessibleDocument Methods (5) ---------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user