Bug 1254831 - Fix compiler errors when SHOW_BOUNDING_BOX #ifdef is enabled. r=fredw
authorJames Kitchener <jkitch.bug@gmail.com>
Thu, 31 Mar 2016 04:04:00 +0200
changeset 291171 31b2154a19278fc2fbc2cb2566f564768a997aa7
parent 291170 c5403f96501802f26783f0c17500958f682a2593
child 291172 419899bf45c5ca10612a059b1852a95d736e1b29
push id74502
push usercbook@mozilla.com
push dateFri, 01 Apr 2016 12:13:49 +0000
treeherdermozilla-inbound@0e7aec22dfef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfredw
bugs1254831
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1254831 - Fix compiler errors when SHOW_BOUNDING_BOX #ifdef is enabled. r=fredw
layout/mathml/nsMathMLFrame.cpp
layout/mathml/nsMathMLFrame.h
--- a/layout/mathml/nsMathMLFrame.cpp
+++ b/layout/mathml/nsMathMLFrame.cpp
@@ -306,38 +306,38 @@ public:
   NS_DISPLAY_DECL_NAME("MathMLBoundingMetrics", TYPE_MATHML_BOUNDING_METRICS)
 private:
   nsRect    mRect;
 };
 
 void nsDisplayMathMLBoundingMetrics::Paint(nsDisplayListBuilder* aBuilder,
                                            nsRenderingContext* aCtx)
 {
-  DrawTarget* drawTarget = aRenderingContext->GetDrawTarget();
+  DrawTarget* drawTarget = aCtx->GetDrawTarget();
   Rect r = NSRectToRect(mRect + ToReferenceFrame(),
                         mFrame->PresContext()->AppUnitsPerDevPixel());
   ColorPattern blue(ToDeviceColor(Color(0.f, 0.f, 1.f, 1.f)));
   drawTarget->StrokeRect(r, blue);
 }
 
-nsresult
+void
 nsMathMLFrame::DisplayBoundingMetrics(nsDisplayListBuilder* aBuilder,
                                       nsIFrame* aFrame, const nsPoint& aPt,
                                       const nsBoundingMetrics& aMetrics,
                                       const nsDisplayListSet& aLists) {
   if (!NS_MATHML_PAINT_BOUNDING_METRICS(mPresentationData.flags))
-    return NS_OK;
+    return;
     
   nscoord x = aPt.x + aMetrics.leftBearing;
   nscoord y = aPt.y - aMetrics.ascent;
   nscoord w = aMetrics.rightBearing - aMetrics.leftBearing;
   nscoord h = aMetrics.ascent + aMetrics.descent;
 
-  return aLists.Content()->AppendNewToTop(new (aBuilder)
-      nsDisplayMathMLBoundingMetrics(aBuilder, this, nsRect(x,y,w,h)));
+  aLists.Content()->AppendNewToTop(new (aBuilder)
+      nsDisplayMathMLBoundingMetrics(aBuilder, aFrame, nsRect(x,y,w,h)));
 }
 #endif
 
 class nsDisplayMathMLBar : public nsDisplayItem {
 public:
   nsDisplayMathMLBar(nsDisplayListBuilder* aBuilder,
                      nsIFrame* aFrame, const nsRect& aRect)
     : nsDisplayItem(aBuilder, aFrame), mRect(aRect) {
--- a/layout/mathml/nsMathMLFrame.h
+++ b/layout/mathml/nsMathMLFrame.h
@@ -346,20 +346,20 @@ public:
   GetRadicalParameters(nsFontMetrics* aFontMetrics,
                        bool aDisplayStyle,
                        nscoord& aRadicalRuleThickness,
                        nscoord& aRadicalExtraAscender,
                        nscoord& aRadicalVerticalGap);
 
 protected:
 #if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
-  nsresult DisplayBoundingMetrics(nsDisplayListBuilder* aBuilder,
-                                  nsIFrame* aFrame, const nsPoint& aPt,
-                                  const nsBoundingMetrics& aMetrics,
-                                  const nsDisplayListSet& aLists);
+  void DisplayBoundingMetrics(nsDisplayListBuilder* aBuilder,
+                              nsIFrame* aFrame, const nsPoint& aPt,
+                              const nsBoundingMetrics& aMetrics,
+                              const nsDisplayListSet& aLists);
 #endif
 
   /**
    * Display a solid rectangle in the frame's text color. Used for drawing
    * fraction separators and root/sqrt overbars.
    */
   void DisplayBar(nsDisplayListBuilder* aBuilder,
                   nsIFrame* aFrame, const nsRect& aRect,