nsStyleBackground-nostack
author Benjamin Smedberg <benjamin@smedbergs.us>
Thu, 26 Jun 2008 11:20:04 -0400
changeset 143 be023c72990665fe43e9870562ac7fbd86e703a4
parent 138 f20394841a97fd94c56067d26700fb3617cdc401
permissions -rw-r--r--
Fold things together.

* * *

diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -3380,7 +3380,8 @@ nsCSSRendering::PaintBackground(nsPresCo
     return;
   }
 
-  nsStyleBackground canvasColor(*color);
+  nsStyleBackground &canvasColor =
+    *new (aPresContext) nsStyleBackground(*color);
 
   nsIViewManager* vm = aPresContext->GetViewManager();
 
diff --git a/layout/forms/nsGfxRadioControlFrame.cpp b/layout/forms/nsGfxRadioControlFrame.cpp
--- a/layout/forms/nsGfxRadioControlFrame.cpp
+++ b/layout/forms/nsGfxRadioControlFrame.cpp
@@ -149,9 +149,10 @@ nsGfxRadioControlFrame::PaintRadioButton
   // XXXldb It would make more sense to use
   // |aRenderingContext.FillEllipse| here, but on at least GTK that
   // doesn't draw a round enough circle.
-  nsStyleBackground tmpColor     = *myColor;
+  nsPresContext* pc = PresContext();
+
+  nsStyleBackground &tmpColor = *new (pc) nsStyleBackground(*myColor);
   tmpColor.mBackgroundColor = color->mColor;
-  nsPresContext* pc = PresContext();
   nsCSSRendering::PaintBackgroundWithSC(pc, aRenderingContext,
                                         this, aDirtyRect, rect,
                                         tmpColor, *myBorder, *myPadding, PR_FALSE);