Bug 399594. Description not exposed when on object with display:none, Patch by vasiliy.potapenko@gmail.com. r=aaronlev, r=surkov, r=ginn.chen, a=schrep

This commit is contained in:
aaronleventhal@moonset.net 2007-11-15 07:44:04 -08:00
parent 0d763e0583
commit bcc923eced

View File

@ -1549,9 +1549,13 @@ nsresult nsAccessible::AppendFlatStringFromContentNode(nsIContent *aContent, nsA
}
if (aContent->TextLength() > 0) {
nsIFrame *frame = shell->GetPrimaryFrameFor(aContent);
NS_ENSURE_TRUE(frame, NS_ERROR_FAILURE);
nsresult rv = frame->GetRenderedText(aFlatString);
NS_ENSURE_SUCCESS(rv, rv);
if (frame) {
nsresult rv = frame->GetRenderedText(aFlatString);
NS_ENSURE_SUCCESS(rv, rv);
} else {
//if aContent is an object that is display: none, we have no a frame
aContent->AppendTextTo(*aFlatString);
}
if (isHTMLBlock && !aFlatString->IsEmpty()) {
aFlatString->Append(PRUnichar(' '));
}