Checking in scc's fix for blocker bug 62818, nsSlidingSubstring::GetReadableFragment(..., kFragmentAt, ...) wasn't implemented and that caused a crash when serializing HTML to plain text. r=me.

This commit is contained in:
jst%netscape.com 2000-12-14 22:16:10 +00:00
Родитель de8a090ca0
Коммит c5961226d7
3 изменённых файлов: 36 добавлений и 3 удалений

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

@ -233,7 +233,18 @@ nsSlidingSubstring::GetReadableFragment( nsReadableFragment<PRUnichar>& aFragmen
break;
case kFragmentAt:
// ...work...
{
// kFragmentAt is going away; we hate this linear search
PRUint32 N;
result_buffer = mStart.mBuffer;
while ( result_buffer && (N = PRUint32(result_buffer->DataLength())) < aOffset )
{
aOffset -= N;
result_buffer = result_buffer->mNext;
}
}
break;
}

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

@ -233,7 +233,18 @@ nsSlidingSubstring::GetReadableFragment( nsReadableFragment<PRUnichar>& aFragmen
break;
case kFragmentAt:
// ...work...
{
// kFragmentAt is going away; we hate this linear search
PRUint32 N;
result_buffer = mStart.mBuffer;
while ( result_buffer && (N = PRUint32(result_buffer->DataLength())) < aOffset )
{
aOffset -= N;
result_buffer = result_buffer->mNext;
}
}
break;
}

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

@ -233,7 +233,18 @@ nsSlidingSubstring::GetReadableFragment( nsReadableFragment<PRUnichar>& aFragmen
break;
case kFragmentAt:
// ...work...
{
// kFragmentAt is going away; we hate this linear search
PRUint32 N;
result_buffer = mStart.mBuffer;
while ( result_buffer && (N = PRUint32(result_buffer->DataLength())) < aOffset )
{
aOffset -= N;
result_buffer = result_buffer->mNext;
}
}
break;
}