Bug 1254831 - Invalidate mfracs when linethickness changes. r=fredw
authorJames Kitchener <jkitch.bug@gmail.com>
Thu, 31 Mar 2016 03:59:00 +0200
changeset 291229 c5403f96501802f26783f0c17500958f682a2593
parent 291228 fe8bfb08d27387b0d584ee18b9ce6541a8e03884
child 291230 31b2154a19278fc2fbc2cb2566f564768a997aa7
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfredw
bugs1254831
milestone48.0a1
Bug 1254831 - Invalidate mfracs when linethickness changes. r=fredw
layout/mathml/nsMathMLmfracFrame.cpp
layout/mathml/nsMathMLmfracFrame.h
layout/reftests/mathml/reftest.list
--- a/layout/mathml/nsMathMLmfracFrame.cpp
+++ b/layout/mathml/nsMathMLmfracFrame.cpp
@@ -159,16 +159,30 @@ nsMathMLmfracFrame::BuildDisplayList(nsD
   // paint the fraction line
   if (mIsBevelled) {
     DisplaySlash(aBuilder, this, mLineRect, mLineThickness, aLists);
   } else {
     DisplayBar(aBuilder, this, mLineRect, aLists);
   }
 }
 
+
+nsresult
+nsMathMLmfracFrame::AttributeChanged(int32_t  aNameSpaceID,
+                                     nsIAtom* aAttribute,
+                                     int32_t  aModType)
+{
+  if (nsGkAtoms::linethickness_ == aAttribute) {
+    InvalidateFrame();
+  }
+  return
+    nsMathMLContainerFrame::AttributeChanged(aNameSpaceID, aAttribute,
+                                             aModType);
+}
+
 /* virtual */ nsresult
 nsMathMLmfracFrame::MeasureForWidth(DrawTarget* aDrawTarget,
                                     nsHTMLReflowMetrics& aDesiredSize)
 {
   return PlaceInternal(aDrawTarget, false, aDesiredSize, true);
 }
 
 nscoord
--- a/layout/mathml/nsMathMLmfracFrame.h
+++ b/layout/mathml/nsMathMLmfracFrame.h
@@ -65,16 +65,21 @@ public:
   Place(DrawTarget*          aDrawTarget,
         bool                 aPlaceOrigin,
         nsHTMLReflowMetrics& aDesiredSize) override;
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) override;
 
+  virtual nsresult
+  AttributeChanged(int32_t  aNameSpaceID,
+                   nsIAtom* aAttribute,
+                   int32_t  aModType) override;
+
   NS_IMETHOD
   TransmitAutomaticData() override;
 
   // override the base method so that we can deal with the fraction line
   virtual nscoord
   FixInterFrameSpacing(nsHTMLReflowMetrics& aDesiredSize) override;
 
   // helper to translate the thickness attribute into a usable form
--- a/layout/reftests/mathml/reftest.list
+++ b/layout/reftests/mathml/reftest.list
@@ -344,28 +344,28 @@ fails-if(B2G||Mulet||Android||/^Windows\
 == mfrac-A-2.html mfrac-A-2-ref.html
 == mfrac-A-3.html mfrac-A-3-ref.html
 == mfrac-A-4.html mfrac-A-4-ref.html
 == mfrac-A-5.html mfrac-A-5-ref.html
 == mfrac-A-6.html mfrac-A-6-ref.html
 == mfrac-A-7.html mfrac-A-7-ref.html
 == mfrac-A-8.html mfrac-A-8-ref.html
 == mfrac-B-1.html mfrac-B-1-ref.html
-fails-if(winWidget&&!(browserIsRemote&&d2d)) == mfrac-B-2.html mfrac-B-2-3-ref.html
-fails-if(winWidget&&!(browserIsRemote&&d2d)) == mfrac-B-3.html mfrac-B-2-3-ref.html
+== mfrac-B-2.html mfrac-B-2-3-ref.html
+== mfrac-B-3.html mfrac-B-2-3-ref.html
 == mfrac-B-4.html mfrac-B-4-5-ref.html
 == mfrac-B-5.html mfrac-B-4-5-ref.html
 == mfrac-B-6.html mfrac-B-6-7-ref.html
 == mfrac-B-7.html mfrac-B-6-7-ref.html
 fuzzy-if(OSX,1,100) fuzzy-if(skiaContent,1,14) == mfrac-C-1.html mfrac-C-1-ref.html
-fails-if(winWidget&&!(browserIsRemote&&d2d)) == mfrac-C-2.html mfrac-C-2-ref.html
+== mfrac-C-2.html mfrac-C-2-ref.html
 == mfrac-C-3.html mfrac-C-3-ref.html
 == mfrac-C-4.html mfrac-C-4-ref.html
 fuzzy-if(OSX,1,100) fuzzy-if(skiaContent,1,14) == mfrac-D-1.html mfrac-D-1-ref.html
-fails-if(winWidget&&!(browserIsRemote&&d2d)) == mfrac-D-2.html mfrac-D-2-ref.html
+== mfrac-D-2.html mfrac-D-2-ref.html
 == mfrac-D-3.html mfrac-D-3-ref.html
 == mfrac-D-4.html mfrac-D-4-ref.html
 == mfrac-E-1.html mfrac-E-1-ref.html
 test-pref(dom.webcomponents.enabled,true) == shadow-dom-1.html shadow-dom-1-ref.html
 pref(font.size.inflation.emPerLine,25) == font-inflation-1.html font-inflation-1-ref.html
 test-pref(font.minimum-size.x-math,40) == default-font.html default-font-ref.html
 != radicalbar-1.html about:blank
 != radicalbar-1a.html about:blank