Bug 210556 - Plaintext serialization with no formatting whatsoever should be possible.

This makes Node.textContent behave as defined in the DOM Level 3 draft.
r=harishd@netscape.com sr=jst@netscape.com
This commit is contained in:
caillon%returnzero.com 2003-07-03 00:34:34 +00:00
Родитель 6aa7522fbf
Коммит 9a00b94017
1 изменённых файлов: 18 добавлений и 1 удалений

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

@ -610,6 +610,15 @@ nsPlainTextSerializer::IsEnabled(PRInt32 aTag, PRBool* aReturn)
nsresult
nsPlainTextSerializer::DoOpenContainer(const nsIParserNode* aNode, PRInt32 aTag)
{
if (mFlags & nsIDocumentEncoder::OutputRaw) {
// Raw means raw. Don't even think about doing anything fancy
// here like indenting, adding line breaks or any other
// characters such as list item bullets, quote characters
// around <q>, etc. I mean it! Don't make me smack you!
return NS_OK;
}
eHTMLTags type = (eHTMLTags)aTag;
if (mTagStackIndex < TagStackSize) {
@ -913,12 +922,20 @@ nsPlainTextSerializer::DoOpenContainer(const nsIParserNode* aNode, PRInt32 aTag)
}
return NS_OK;
}
nsresult
nsPlainTextSerializer::DoCloseContainer(PRInt32 aTag)
{
if (mFlags & nsIDocumentEncoder::OutputRaw) {
// Raw means raw. Don't even think about doing anything fancy
// here like indenting, adding line breaks or any other
// characters such as list item bullets, quote characters
// around <q>, etc. I mean it! Don't make me smack you!
return NS_OK;
}
if (mTagStackIndex > 0) {
--mTagStackIndex;
}