Closed Bug 222667 Opened 21 years ago Closed 21 years ago

Composition inserts three blank lines between headers and message

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mozilla, Assigned: sicking)

References

Details

(Keywords: regression)

Attachments

(1 file)

2003101604 trunk

Compose a plain-text message and send it. Notice that there are three blank
lines between the headers and the message instead of one blank line. This
regressed between 2003101504 and 2003101604 builds.
This also happens on Linux.
OS: Windows XP → All
And one blank line after the body itself too ...
sicking: it seems your checkin from Bug 199613 broke this, backin out your patch
made this work again.
Assignee: sspitzer → bugmail
Component: Composition → DOM Core
Product: MailNews → Browser
sicking: um i just tried again, backed out again but now the bug is still there.
But anyway might you try to back your patch out if you have then the problem is
gone (sorry, if i waste your time with this...) ? 
Frank, I'm sure it's bug 199613's patch. Each time when removing it, the problem
disappears and when reapplying the patch it's back again.
i'll take a look at this, the regression is most likly due to my change to the
serializer
Status: NEW → ASSIGNED
This is a pretty bad regression since it inserts two empty lines at the top of
every mail that is sent (and an additional two if you save a draft first and
then send it).

I should have a patch pretty soon
Flags: blocking1.6a?
*** Bug 223133 has been marked as a duplicate of this bug. ***
1.6a doesn't have much time. Jonas, do you think you could have something in the
next day or two?
Yes, i should have a patch tomorrow latest, it's almost done.
Attached patch patch to fixSplinter Review
This moves the logic to add newlines from the encoder to the serializer. The
problem was that we appended newline characters for root domnodes when using
the plaintext serializer which we of course shouldn't do.

It also makes us not add newlines after the last root node, or when serializing
just one rootnode.
Attachment #133897 - Flags: superreview?(jst)
Attachment #133897 - Flags: review?(peterv)
*** Bug 223306 has been marked as a duplicate of this bug. ***
Comment on attachment 133897 [details] [diff] [review]
patch to fix

> Index: content/base/src/nsXMLContentSerializer.h
> ===================================================================

> +  void MaybeAddInrootNewline(nsAString& aStr);
> +  void MaybeFlagInrootNewline(nsIDOMNode* aNode);

I'd name this MaybeAddNewLineInRoot and FlagMaybeAddNewLineInRoot or something
like that.

>    PRInt32 mPrefixIndex;
>    nsVoidArray mNameSpaceStack;
> -  PRBool mInAttribute;
> +  PRPackedBool mInAttribute;
> +  PRPackedBool mAddInrootNewline;

mAddNewLineInRoot
Attachment #133897 - Flags: review?(peterv) → review+
talked on irc and we decided to go for MaybeAddNewline, MaybeFlagNewline and
mAddNewline.
Comment on attachment 133897 [details] [diff] [review]
patch to fix

sr=jst
Attachment #133897 - Flags: superreview?(jst) → superreview+
Comment on attachment 133897 [details] [diff] [review]
patch to fix

This fixes a regression in mail where two (or more) blank lines would be
inserted at the start of a mail before it's being sent.

The patch is not 100% safe, but should not break anything that isn't already
broken.
Attachment #133897 - Flags: approval1.6a?
Comment on attachment 133897 [details] [diff] [review]
patch to fix

a=asa (on behalf of drivers) for checkin to 1.6alpha
Attachment #133897 - Flags: approval1.6a? → approval1.6a+
checked in, thanks for reviews
wfm Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6a) Gecko/20031024
Sent a testmail from my POP Account at one provider to my IMAP account of
another provider, plaintext, was looking fine, and I opened the editor,
source-view, and found only one <br> between header and subject, and after my
'greetings hh' at the end. Shouldn´t this bug be marked fixed?
upps, thought i did that already, thanks
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Flags: blocking1.6a?
Component: DOM: Core → DOM: Core & HTML
QA Contact: esther → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: