Call FlushText after calling AddText, to keep from dropping text at the end of the fragment

This commit is contained in:
akkana%netscape.com 1999-06-28 23:39:15 +00:00
Родитель ed2b503c50
Коммит da93c0ae05
2 изменённых файлов: 10 добавлений и 0 удалений

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

@ -144,6 +144,9 @@ nsHTMLFragmentContentSink::nsHTMLFragmentContentSink()
nsHTMLFragmentContentSink::~nsHTMLFragmentContentSink()
{
// Should probably flush the text buffer here, just to make sure:
//FlushText();
NS_IF_RELEASE(mRoot);
NS_IF_RELEASE(mParser);
NS_IF_RELEASE(mCurrentForm);
@ -566,6 +569,8 @@ nsHTMLFragmentContentSink::AddText(const nsString& aString)
addLen -= amount;
}
FlushText();
return NS_OK;
}

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

@ -144,6 +144,9 @@ nsHTMLFragmentContentSink::nsHTMLFragmentContentSink()
nsHTMLFragmentContentSink::~nsHTMLFragmentContentSink()
{
// Should probably flush the text buffer here, just to make sure:
//FlushText();
NS_IF_RELEASE(mRoot);
NS_IF_RELEASE(mParser);
NS_IF_RELEASE(mCurrentForm);
@ -566,6 +569,8 @@ nsHTMLFragmentContentSink::AddText(const nsString& aString)
addLen -= amount;
}
FlushText();
return NS_OK;
}