I'd like to remove unnecessary methods of nsIEditActionListener or
nsIEditActionListener itself completely.
This is not buildinclass. So, this can be implemented by XUL addons.
Currently, this is used only by ThunderHTMLedit (only Did*()).
Additionally, 3 internal classes of Gecko implements this interface.
Supporting this interface is expensive from a point of view of Quantum
Flow. When editor changes DOM tree, a set of methods of this interface
is always called every time. When running for loop to call a method of
the interface, we need to copy edit action listeners array with array of
strong pointer. Then, we need to call them with nsIDOM* interfaces.
I.e., a lot of unnecessary QIs are required. Additionally, each
implementation will QI back to nsINode or something. Finally, all of
them are virtual call but our internal classes implements less than half
of the methods.
So, my current idea is, keep supporting ThunderHTMLedit as far as
possible. Even with that, we can make all our internal classes are
notified directly instead of via the interface. This is not so
beautiful but we can get rid of virtual call cost, unnecessary method
calls and unnecessary QIs. Then, only XUL addon for Thunderbird may use
the interface. However, in most environment, that's not used. So, our
editor can check before doing for loop if there is edit action listeners.
Feel free to suggest something in this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1429676
And currently, I'm working on making HTMLEditRules not derived from
nsIEditActionListener:
https://bugzilla.mozilla.org/show_bug.cgi?id=1430021
And nsIEditActionListener::Will*() will be removed because of no users:
https://bugzilla.mozilla.org/show_bug.cgi?id=1430319
--
Masayuki Nakano <masay...@d-toybox.com>
Software Engineer, Mozilla
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform