Get rid of nsHTMLFormatConverter and nsIFormatConverter

NEW
Unassigned

Status

()

Core
Serializers
--
enhancement
7 years ago
7 years ago

People

(Reporter: hsivonen, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
It looks like nsHTMLFormatConverter and nsIFormatConverter are excessive abstraction and architecture. Callers could be adapted to call nsContentUtils::ConvertToPlainText with the appropriate flags once bug 650784 has landed.

Comment 1

7 years ago
Did you check how many extensions use this? Myself, I have not seen this being used ever, it's the first time I see this, IIRC. I think people simply didn't *find* it as the API to nsPlaintextConverter and thus didn't use it, so a simple comment in the right place would do wonders.

Personally, I don't think it's such a bad idea, though. I'd just combine getInputDataFlavors(); getOutputDataFlavors(); boolean canConvert(..); into getConversionMimetypes() which returns a single list of "ab/dc; e=f|gh/ij; k=l" (from|to).

But I can see why you would prefer a single ConvertHTMLToTXT() function. It's much easier to implement and to use by extensions.
You need to log in before you can comment on or make changes to this bug.