Closed Bug 1413854 Opened 2 years ago Closed Last year

nsTXTToHTMLConv stream converters seem to be unused

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: marco, Assigned: marco)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

From the code coverage report, it looks like these files are never executed during tests.
Could they still be used or are they dead code? If they are still used, we should write tests for them.
Flags: needinfo?(mcmanus)
I believe valentin is rem
Flags: needinfo?(mcmanus)
We will remove or disable this code for Firefox, and I think it should still  work for mailnews...
Flags: needinfo?(schien)
Priority: -- → P3
Whiteboard: [necko-triaged]
The removal of nsBinHexDecoder will be done by bug 1390708.
Flags: needinfo?(schien)
Depends on: 1390708
Assignee: nobody → mcastelluccio
Status: NEW → ASSIGNED
Attachment #8964123 - Flags: review?(dd.mozilla)
Do you know if this is maybe used by Thunderbird?
Flags: needinfo?(mcastelluccio)
(In reply to Dragana Damjanovic [:dragana] from comment #5)
> Do you know if this is maybe used by Thunderbird?

I don't, but Philipp probably does.
Flags: needinfo?(mcastelluccio) → needinfo?(philipp)
nsTXTToHTMLConv sounds like something Thunderbird would use, but I'm not finding any references, neither nsTXTToHTMLConv directly, nor e.g. from=text/plain&to=text/html. Maybe Jörg or Magnus have insights?
Flags: needinfo?(philipp)
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(jorgk)
There's also mozTXTToHTMLConv, which appears to be unused too.
mozTXTToHTMLConv and therefore mozITXTToHTMLConv is used at multiple locations in comm-central. Maybe we can replace this with something simpler, e.g set .textContent and get .innerHTML.
(In reply to Philipp Kewisch [:Fallen]  from comment #9)
> mozTXTToHTMLConv and therefore mozITXTToHTMLConv is used at multiple
> locations in comm-central. Maybe we can replace this with something simpler,
> e.g set .textContent and get .innerHTML.

Oh right, mozITXTToHTMLConv is used in mozilla-central too.
So maybe in comm-central you are using mozTXTToHTMLConv and not nsTXTToHTMLConv?
I didn't know nsTXTToHTMLConv existed ;-)

mozITXTToHTMLConv is heavily used in C-C, for example it converts plain text in mail and chat with *bold* _underline_ /italic/, etc. to the equivalent HTML. I once tried to remove it from M-C in order to give it a new home in C-C, but that failed since it's used in a obscure place in spellcheck: extensions/spellcheck/src/mozEnglishWordUtils.cpp
  mURLDetector = do_CreateInstance(MOZ_TXTTOHTMLCONV_CONTRACTID, &rv);

This functionality is *very* important and we would have to fork it if Necko ever wanted to get rid of it.

P.S.: In the future, please direct similar questions to me.
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(jorgk)
(In reply to Jorg K (GMT+1) from comment #11)
> I didn't know nsTXTToHTMLConv existed ;-)
> 
> mozITXTToHTMLConv is heavily used in C-C, for example it converts plain text
> in mail and chat with *bold* _underline_ /italic/, etc. to the equivalent
> HTML. I once tried to remove it from M-C in order to give it a new home in
> C-C, but that failed since it's used in a obscure place in spellcheck:
> extensions/spellcheck/src/mozEnglishWordUtils.cpp
>   mURLDetector = do_CreateInstance(MOZ_TXTTOHTMLCONV_CONTRACTID, &rv);
> 
> This functionality is *very* important and we would have to fork it if Necko
> ever wanted to get rid of it.

No worries, this bug is just about nsTXTToHTMLConv ;)

> P.S.: In the future, please direct similar questions to me.

Ok, thanks!

Dragana, sounds like it isn't used both in Firefox and Thunderbird, so we should be able to remove it.
Removing nsBinHexDecoder from the summary, or is there a second patch coming? The BinHex decoder was already removed in bug 1390708. Am I missing something?
Summary: nsBinHexDecoder and nsTXTToHTMLConv stream converters seem to be unused → nsTXTToHTMLConv stream converters seem to be unused
(In reply to Jorg K (GMT+1) from comment #13)
> Removing nsBinHexDecoder from the summary, or is there a second patch
> coming? The BinHex decoder was already removed in bug 1390708. Am I missing
> something?

When I filed the bug it hadn't been removed yet (and I didn't know the removal was already tracked in another bug), I forgot to update the summary.
Attachment #8964123 - Flags: review?(dd.mozilla) → review+
Pushed by mcastelluccio@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0da15d6e0f3a
Remove nsTXTToHTMLConv as it is no longer used. r=dragana
https://hg.mozilla.org/mozilla-central/rev/0da15d6e0f3a
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.