Bug 739193 - nsTextEquivUtils::AppendTextEquivFromContent shouldn't use GetAccService()->GetAccessible, r=hub, tbsaunde

This commit is contained in:
Max Li 2012-03-30 20:06:48 -04:00
parent d2f8632b9b
commit 060813175c

View File

@ -118,13 +118,6 @@ nsTextEquivUtils::AppendTextEquivFromContent(nsAccessible *aInitiatorAcc,
gInitiatorAcc = aInitiatorAcc;
nsIPresShell* shell = nsCoreUtils::GetPresShellFor(aContent);
if (!shell) {
NS_ASSERTION(true, "There is no presshell!");
gInitiatorAcc = nsnull;
return NS_ERROR_UNEXPECTED;
}
// If the given content is not visible or isn't accessible then go down
// through the DOM subtree otherwise go down through accessible subtree and
// calculate the flat string.
@ -136,7 +129,7 @@ nsTextEquivUtils::AppendTextEquivFromContent(nsAccessible *aInitiatorAcc,
if (isVisible) {
nsAccessible* accessible =
GetAccService()->GetAccessible(aContent, shell);
gInitiatorAcc->Document()->GetAccessible(aContent);
if (accessible) {
rv = AppendFromAccessible(accessible, aString);
goThroughDOMSubtree = false;