Closed Bug 195020 Opened 22 years ago Closed 21 years ago

Nested content of HTML message not shown in "view message as simple html" mode

Categories

(MailNews Core :: MIME, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.4alpha

People

(Reporter: KaiE, Assigned: harishd)

Details

(Keywords: regression)

Attachments

(3 files)

This is a regression.
Mozilla 1.0.1 works fine.
Mozilla 1.2.1 works fine.
My own archived test build, Mozilla 1.2.1 with patches from bug 161488 and bug
179082 works fine, too.

The first build I still have around and that does no longer work is from 2003-01-29.
Latest nightlies don't work either.
The recent fixes for bug 189988, bug 194636, bug 188344 seem to be unrelated, I
have tested to back them out, still doesn't work.
Being more specific, my test case looks like:

encrypted message, contains
  body text
  message forwarded inline
    headers of forwarded message
    body of forwarded message
    another message forwarded inline
      headers of forwarded message
      body of forwarded message       <<< problem

The last portion is not displayed with recent builds.
It shows up fine in older builds, as explained above.

Unfortunately I can not attach the testcase, the contents are encrypted for good
reason :-)
1.3 is broken, too, so the regression was introduced between the dates when we
branched for 1.2 (2002-11-05) and the release of 1.3a (2002-12-13).

I suppose it is likely that the regression is below mailnews/mime.
There were a lot of checkins between those dates, unfortunately.

While we no longer have mozilla builds from that timespan archived on ftp.m.o,
we do still have commercial nightly builds available. I will try a binary search
using those builds, I think that's easier than backing out all the potential
patches.
After a lot of testing I found:

2002-11-19 is the latest build that is able to display my message correctly

2002-11-20 and all builds after are broken
I was able to contents of the encrypted message.
It is an HTML message.
I replaced all text contained in the message with dummy text, but I did not
change any part of the message structure. At the end of the message I added
some indicator text, saying "THIS IS NOT SHOWN".

This attachment is a mail message box file. Copy it to your profile,
subdirectory "Mail/Local Folders".

Use a build up to Mozilla 1.2.1 and open the message.
You'll see the text "THIS IS NOT SHOWN..."

Use a more recent build, for example the latest nightly.
You'll NOT see the text "THIS IS NOT SHOWN".


Expected behaviour: All text should be shown with the latest version of
Mozilla.
Summary: Nested content of encrypted message not shown → Nested content of HTML message not shown
I have a fresh Win2K build, built from scratch yesterday 2003-02-25, and I
just cannot reproduce this bug with the testcase attached. I see perfectly
well the lines commented "LINES NOT SHOWN".
And I use a different profile, so no profile corruption is possible here

==> WFM ?
I just found out that you'll only see this bug when using the option:
mail window/view/message body as/simple html

So it seems, a checkin on that date has broken the simple html translation, the
build from 2002-11-19 alraedy has the "view as simple" option, and it does
display correctly.
Summary: Nested content of HTML message not shown → Nested content of HTML message not shown in "view message as simple html" mode
Ok, I confirm the bug with that option.
If I use Document Inspector to see the style rules applied to the corresponding
nodes, I don't even see the nodes there. They are not here. So I don't think
my Resizing checkin can be guilty for that since it's totally unable to remove
elements from the tree like that...
Marking as blocking 1.4a.  Arnold says: "Regressions will not be tolerated."
Flags: blocking1.4a+
The parser landing (parser node lifespan shortening) that day could be the
culprit. It was quite major and caused some regressions which were quickly
fixed. This one might have gone unnoticed. 

CC:ing Harish who did the work and Ben who knows Simple HTML better than most.
Over to Harish, who agrees this problem might have been introduced with the
parser node optimization checkin. Thanks for looking!
Assignee: kaie → harishd
Priority: -- → P2
Target Milestone: --- → mozilla1.4alpha
I uncommented line 168 ( printf("%s",
NS_LossyConvertUCS2toASCII(aString).get()); ), in mozSanitizingSerializer.cpp,
and _did_see_ the complete message on the standard output!  
Attached file HTML page test case
Harish, thanks for this update.
With this hint I produced a HTML output file, which is the contents that are
being given to the layout engine (?) for display.

I am attaching a HTML file that contains sections which are not displayed,
neither in mail, nor in navigator window.

It seems the problem is being caused by funky <title> tags.

When looking at the attached HTML with the latest Mozilla, the NOT SHOWN
content is not shown.

When looking at the attached HTML with Mozilla 1.0x, the NOT SHOWN content is
shown in the title bar.
It's bug 182021 that has caused this regression. 
Attached patch Patch v1Splinter Review
This change was suggested by Harish.
Comment on attachment 116901 [details] [diff] [review]
Patch v1

The patch fixes the problem for me.

Harish, can you please review?
Attachment #116901 - Flags: review?(harishd)
Comment on attachment 116901 [details] [diff] [review]
Patch v1

r=harishd
Attachment #116901 - Flags: review?(harishd) → review+
Comment on attachment 116901 [details] [diff] [review]
Patch v1

Note: One thing that the patch does not address is handling of attributes in
the title tag. Honestly, I hate myself for making this suggestion ( of writing
out <title> and </title> ), however, this is the simplest patch with almost no
risk. I can come up with a different patch, if need be, but unfortunately I
don't have the time for it right now.
On the other hand, I'll feel much better if I can fix this the right way. Will
try to find some time :-/
Status: NEW → ASSIGNED
Flags: blocking1.4a+ → blocking1.4a-
Nominating as a blocker. This is a regression and we have a fix.

Harish, I think we should check in the workaround until you have time to work on
a better fix?
Flags: blocking1.4b?
Keywords: nsbeta1
Comment on attachment 116901 [details] [diff] [review]
Patch v1

Peter, can you please review?
Attachment #116901 - Flags: superreview?(peterv)
Attachment #116901 - Flags: superreview?(peterv) → superreview+
Fix landed.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
clearing request, since this has landed.
Flags: blocking1.4b?
Trunk build 2003-04-24: Mac 10.1.5
Trunk build 2003-04-23: WinXP
Verified Fixed.
Status: RESOLVED → VERIFIED
QA Contact: stephend → nbaca
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: