nsStyleBackground-nostack
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 143 be023c72990665fe43e9870562ac7fbd86e703a4
permissions -rw-r--r--
State as of now

* * *

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);