Syntax highlighting is broke for view source of mail messages (should be disabled)

RESOLVED FIXED in Thunderbird 3.0b3

Status

defect
RESOLVED FIXED
16 years ago
10 years ago

People

(Reporter: raccettura, Assigned: philor)

Tracking

Trunk
Thunderbird 3.0b3
Bug Flags:
blocking-thunderbird2 -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
toggle the menu option results in the following:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIWebPageDescriptor.currentDescriptor]" 
nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://global/content/viewSource.js :: highlightSyntax :: line 539"  data: no]

Not sure what's going on here.  Tried to take care of this myself, but with no
success.  Any hints?

Comment 1

15 years ago
Syntax highlighting doesn't work for mail messages in thunderbird or seamonkey.
(Reporter)

Comment 2

15 years ago
Hmm.  I haven't tried seamonkey since 1.5. (1.6 nightly's installer is broken
for me, making it more of a pain).

Played with this the other night.  Still can't figure it out.

Comment 3

14 years ago
Viewer syntax highlighting doesn't work for mail messages in thunderbird 1.0+. 

Thunderbird 1.0+ / 1.8b4: 2005.07.19.04 - windows

Comment 4

14 years ago
Steps to reproduce?

Comment 5

14 years ago
Steps to reproduce ? Same as Feb 2004: just try it !
1. Select a html message
2. > view > message source
3. > view > Syntax highlight

Thunderbird 1.0+ / 1.8b4: 2005.07.21.04 - windows

Comment 6

14 years ago
Bug still confirmed with Thunderbird (Windows NT 5.0; rv:1.8b4) Gecko/20050912

»» Page source viewer syntax highlighting works fine on Firefox 1.5B1

Comment 7

13 years ago
still confirmed;

bug closed or forgotten ?
_________________________
ThunderBird version 2 alpha 1 (2006.03.09)

Updated

13 years ago
Flags: blocking-thunderbird2?

Comment 8

13 years ago
as much as diorser loves this bug, we aren't going to block the release on this. That being said, adding the helpwanted keyword, feel free to jump in and hack on it.

Flags: blocking-thunderbird2? → blocking-thunderbird2-
Keywords: helpwanted
(Assignee)

Updated

12 years ago
QA Contact: front-end

Updated

12 years ago
Duplicate of this bug: 393406
Assignee: mscott → nobody

Comment 10

11 years ago
Did this option ever worked in TB ?
Any (new) ideas why it doesn't ?
(Assignee)

Comment 11

10 years ago
Posted patch FixSplinter Review
There are two problems:

* we get the error (now an NS_ERROR_NOT_AVAILABLE error instead of comment 0's NS_ERROR_FAILURE), because the toggle just changes the pref and calls  PageLoader.loadPage(PageLoader.currentDescriptor... to avoid hitting the network, but because we have disablehistory on the view source browser, .currentDescriptor fails

* it will never work, since highlight_syntax only works when what you are viewing is the source of an HTML document as parsed by nsViewSourceHTML.cpp

both of which are neatly "solved" by disabling the menuitem.
Assignee: nobody → philringnalda
Status: NEW → ASSIGNED
Attachment #375498 - Flags: review?(mkmelin+mozilla)
(Assignee)

Updated

10 years ago
Keywords: helpwanted
Target Milestone: --- → Thunderbird 3.0b3
Version: unspecified → Trunk

Comment 12

10 years ago
Are You saying that when a message is content: text/html, that the HTML parsing by nsViewSourceHTML.cpp does not take place in Tb, thus the highlighter is doomed to fail?
(Assignee)

Comment 13

10 years ago
I'm saying that when you View Message Source the document that is loaded in the <browser> is always a message, never text/html, whether or not the only body in the message is text/html.

Comment 14

10 years ago
(In reply to comment #11)
> * it will never work, since highlight_syntax only works when what you are
> viewing is the source of an HTML document as parsed by nsViewSourceHTML.cpp
[...]
> both of which are neatly "solved" by disabling the menuitem.
hmm so another bug would be needed to provide modified ver of syntax highlighting for TB
(Assignee)

Comment 15

10 years ago
Another bug which would need an hero to fix it, and would be at great risk of being wontfixed when someone came face to face with the patch, since it would very probably involve forking viewsource to have our own copy that knows that load/reload involves telling something to tell libmime to break apart a message and pass this part through this, and that part through that, and the other part through the other thing and then reassemble the parts into a single document that would pretend to be the message source.
Summary: Syntax highlighting is broke for view source → Syntax highlighting is broke for view source of mail messages (should be disabled)
Comment on attachment 375498 [details] [diff] [review]
Fix

Sure, r=mkmelin
Attachment #375498 - Flags: review?(mkmelin+mozilla) → review+
(Assignee)

Comment 17

10 years ago
http://hg.mozilla.org/comm-central/rev/bf8d5258553b
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Comment 18

10 years ago
(In reply to comment #11)
> both of which are neatly "solved" by disabling the menuitem.

Why don't you *hide* the useless menu item instead of just disabling it?
You need to log in before you can comment on or make changes to this bug.