Bug 1426345 - Invalidate MathML display items when we destroy the referenced nsMathMLChar. r=mwoodrow, a=abillings
authorMats Palmgren <mats@mozilla.com>
Wed, 27 Dec 2017 10:08:53 +0100
changeset 445465 e691c6af26eff709f74b806b44d82b9a3fc6353b
parent 445464 b2ffd80d6ac9c45616600455daef7bf6a8c07d09
child 445466 6ac2e85d54f6512d5021c5bd5700be9900bc06dc
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwoodrow, abillings
bugs1426345
milestone58.0
Bug 1426345 - Invalidate MathML display items when we destroy the referenced nsMathMLChar. r=mwoodrow, a=abillings
layout/mathml/nsMathMLmfencedFrame.cpp
--- a/layout/mathml/nsMathMLmfencedFrame.cpp
+++ b/layout/mathml/nsMathMLmfencedFrame.cpp
@@ -59,17 +59,16 @@ nsMathMLmfencedFrame::SetInitialChildLis
   CreateFencesAndSeparators(PresContext());
 }
 
 nsresult
 nsMathMLmfencedFrame::AttributeChanged(int32_t         aNameSpaceID,
                                        nsAtom*        aAttribute,
                                        int32_t         aModType)
 {
-  MarkNeedsDisplayItemRebuild();
   RemoveFencesAndSeparators();
   CreateFencesAndSeparators(PresContext());
 
   return nsMathMLContainerFrame::
          AttributeChanged(aNameSpaceID, aAttribute, aModType);
 }
 
 nsresult
@@ -79,16 +78,17 @@ nsMathMLmfencedFrame::ChildListChanged(i
   CreateFencesAndSeparators(PresContext());
 
   return nsMathMLContainerFrame::ChildListChanged(aModType);
 }
 
 void
 nsMathMLmfencedFrame::RemoveFencesAndSeparators()
 {
+  MarkNeedsDisplayItemRebuild();
   delete mOpenChar;
   delete mCloseChar;
   if (mSeparatorsChar) delete[] mSeparatorsChar;
 
   mOpenChar = nullptr;
   mCloseChar = nullptr;
   mSeparatorsChar = nullptr;
   mSeparatorsCount = 0;