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 http://mxr.mozilla.org/mozilla-central/source/layout/mathml/nsMathMLContainerFrame.cpp#745 http://mxr.mozilla.org/mozilla-central/source/layout/mathml/nsMathMLContainerFrame.cpp#789 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: http://mxr.mozilla.org/mozilla-central/source/layout/mathml/nsMathMLContainerFrame.cpp#835 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) > http://mxr.mozilla.org/mozilla-central/source/layout/mathml/ > nsMathMLContainerFrame.cpp#745 > http://mxr.mozilla.org/mozilla-central/source/layout/mathml/ > nsMathMLContainerFrame.cpp#789 > > 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.
Closing this meta bug.