Open Bug 720623 Opened 12 years ago Updated 3 years ago

Get rid of nsHTMLFormatConverter and nsIFormatConverter

Categories

(Core :: DOM: Serializers, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: hsivonen, Unassigned)

References

Details

(Keywords: good-first-bug)

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.
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.

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
Keywords: good-first-bug
You need to log in before you can comment on or make changes to this bug.