Bug 397485 - embed characters to children not 1:1, r=aaronlev, a=mtschrep

This commit is contained in:
surkov.alexander@gmail.com 2007-11-16 19:44:49 -08:00
Родитель 5b44066c63
Коммит 951ff479be
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -456,8 +456,15 @@ nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset,
else {
if (endOffset > 0) {
if (aText) {
*aText += (frame->GetType() == nsAccessibilityAtoms::brFrame) ?
kForcedNewLineChar : kEmbeddedObjectChar;
if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
*aText += kForcedNewLineChar;
} else if (MustPrune(this)) {
*aText += kImaginaryEmbeddedObjectChar;
// Expose imaginary embedded object character if the accessible
// hans't children.
} else {
*aText += kEmbeddedObjectChar;
}
}
if (aBoundsRect) {
aBoundsRect->UnionRect(*aBoundsRect,

Просмотреть файл

@ -53,6 +53,7 @@ enum EGetTextType { eGetBefore=-1, eGetAt=0, eGetAfter=1 };
// This character marks where in the text returned via nsIAccessibleText(),
// that embedded object characters exist
const PRUnichar kEmbeddedObjectChar = 0xfffc;
const PRUnichar kImaginaryEmbeddedObjectChar = ' ';
const PRUnichar kForcedNewLineChar = '\n';
#define NS_HYPERTEXTACCESSIBLE_IMPL_CID \