Bug 1416011 - Make the RoundedRect constructor take const references. r?kats draft
authorMarkus Stange <mstange@themasta.com>
Thu, 09 Nov 2017 17:07:32 -0500
changeset 695821 fa46bf1e007d9c17bfde613d782e73550728d0eb
parent 695806 dcd35dcddec7594f165f1fdd6f9f288745e2edf3
child 739717 7dec8aae135d50da1e88b9b399351f929583036b
push id88553
push userbmo:mstange@themasta.com
push dateThu, 09 Nov 2017 22:08:00 +0000
reviewerskats
bugs1416011
milestone58.0a1
Bug 1416011 - Make the RoundedRect constructor take const references. r?kats MozReview-Commit-ID: HC9JKt2EBdq
gfx/thebes/RoundedRect.h
--- a/gfx/thebes/RoundedRect.h
+++ b/gfx/thebes/RoundedRect.h
@@ -15,17 +15,22 @@ namespace mozilla {
  *
  * This can represent a rectangle with a different pair of radii on each corner.
  *
  * Note: CoreGraphics and Direct2D only support rounded rectangle with the same
  * radii on all corners. However, supporting CSS's border-radius requires the extra flexibility. */
 struct RoundedRect {
     typedef mozilla::gfx::RectCornerRadii RectCornerRadii;
 
-    RoundedRect(gfxRect &aRect, RectCornerRadii &aCorners) : rect(aRect), corners(aCorners) { }
+    RoundedRect(const gfxRect& aRect, const RectCornerRadii& aCorners)
+      : rect(aRect)
+      , corners(aCorners)
+    {
+    }
+
     void Deflate(gfxFloat aTopWidth, gfxFloat aBottomWidth, gfxFloat aLeftWidth, gfxFloat aRightWidth) {
         // deflate the internal rect
         rect.x += aLeftWidth;
         rect.y += aTopWidth;
         rect.SetWidth(std::max(0., rect.Width() - aLeftWidth - aRightWidth));
         rect.SetHeight(std::max(0., rect.Height() - aTopWidth - aBottomWidth));
 
         corners.radii[mozilla::eCornerTopLeft].width =