I know nothing about XPCOM but I think my problem may be able to use
the approach. We, Thai developers, want to patch Mozilla and add ICU
for Mozilla to be able to word-wrap Thai text (serious problem for Thai).
However, ICU is too big to be incorporated into Mozilla so
the approach seems to be impossible.
https://bugzilla.mozilla.org/show_bug.cgi?id=7969
Currently, we have to make custom builds of Firefox with this patch,
update them every new Firefox releases.

I just have another idea, instead of putting the code in Mozilla core,
why not put it in an extension - Thai line-breaking extension.

The extension will do this :-
1) It'll implement the interface nsILineBreaker, using ICU for Thai line
breaking. Layout will use it instead of the existing one.
2) It'll register the new interface in the service NS_LWBRK_CONTRACTID,
so nsDocument::GetLineBreaker() will get the new implementation from
the extension instead.
(Sorry If I don't use the right words technically)

Is this possible? Is it possible to replace the interface implementation from
an extension?

Please tell me what do you think? Is this the way to go?

Thanks.
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to