This is a bug for issues related to attribute/child changes of MathML frames. I make it depends on a couple of other bugs already reported. Andrii Zui has shown interest in working on these issues this summer. I also suggested him to write a couple of tests for dynamic changes in MathML expressions because I suspect there are other bugs currently unknown. Possible related issues to consider are attribute changes on an mstyle element, change of the selected child in maction@toggle, propagations of PresentationData / EmbellishData.
First there are two XXXldb comments in functions handling child changes
saying that we don't need to add dirty flags to all the descendants, just marking the ancestor dirty is enough. I'm also wondering why we do that. If that turns out to be unnecessary then we can just remove these operations.
There is also another XXXldb in nsMathMLContainerFrame::AttributeChanged:
This function is sometimes overridden in child classes but I expect we can do a much better job here. Currently, it seems that we essentially almost always reflow the frame when an attribute changes.
Performance of dynamic changes to MathML DOMs shouldn't matter in practice, should it? Let's not spend energy or code on issues that don't matter.
(In reply to Frédéric Wang from comment #0)
> saying that we don't need to add dirty flags to all the descendants, just
> marking the ancestor dirty is enough. I'm also wondering why we do that. If
> that turns out to be unnecessary then we can just remove these operations.
It is unnecessary. Just remove them.
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #1)
> Performance of dynamic changes to MathML DOMs shouldn't matter in practice,
> should it? Let's not spend energy or code on issues that don't matter.
But the real point of this report was really to fix the known bugs about dynamic MathML formulas. Indeed, even with this drastic reflow method used, some formulas are still not rendered correctly after DOM updates. So we should fix these bugs and I think it's worth trying to find other similar bugs that are likely to exist and to write nonregression tests for them. If at the same time we can optimize a bit the AttributeChanged function, that's even better.
Closing this meta bug.