Bug 590436 nsCSSParser.cpp failed to compile with Sun Studio compiler r=roc a=benjamin
authorGinn Chen <ginn.chen@oracle.com>
Tue, 09 Nov 2010 18:16:18 +0800
changeset 57146 6e3143da97d5e255b68e97e0d6015e3da3a718dd
parent 57145 dda010000be17ed3887eb0e366889fcebfded593
child 57147 c6310223480b858623a50a37010b07fad7ffa49e
push idunknown
push userunknown
push dateunknown
reviewersroc, benjamin
bugs590436
milestone2.0b8pre
Bug 590436 nsCSSParser.cpp failed to compile with Sun Studio compiler r=roc a=benjamin
layout/style/nsCSSParser.cpp
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -434,16 +434,24 @@ protected:
     nsCSSValue&  mColor;
     nsCSSValueList* mImage;
     nsCSSValueList* mRepeat;
     nsCSSValueList* mAttachment;
     nsCSSValueList* mClip;
     nsCSSValueList* mOrigin;
     nsCSSValuePairList* mPosition;
     nsCSSValuePairList* mSize;
+    BackgroundParseState(
+        nsCSSValue& aColor, nsCSSValueList* aImage, nsCSSValueList* aRepeat,
+        nsCSSValueList* aAttachment, nsCSSValueList* aClip,
+        nsCSSValueList* aOrigin, nsCSSValuePairList* aPosition,
+        nsCSSValuePairList* aSize) :
+        mColor(aColor), mImage(aImage), mRepeat(aRepeat),
+        mAttachment(aAttachment), mClip(aClip), mOrigin(aOrigin),
+        mPosition(aPosition), mSize(aSize) {};
   };
 
   PRBool ParseBackgroundItem(BackgroundParseState& aState);
 
   PRBool ParseBackgroundList(nsCSSProperty aPropID); // a single value prop-id
   PRBool ParseBackgroundPosition();
   PRBool ParseBoxPositionValues(nsCSSValuePair& aOut, PRBool aAcceptsInherit);
   PRBool ParseBackgroundSize();
@@ -6159,26 +6167,20 @@ CSSParserImpl::ParseBackground()
            nsCSSProps::SubpropertyEntryFor(eCSSProperty_background);
          *subprops != eCSSProperty_UNKNOWN; ++subprops) {
       AppendValue(*subprops, color);
     }
     return PR_TRUE;
   }
 
   nsCSSValue image, repeat, attachment, clip, origin, position, size;
-  BackgroundParseState state = {
-    color,
-    image.SetListValue(),
-    repeat.SetListValue(),
-    attachment.SetListValue(),
-    clip.SetListValue(),
-    origin.SetListValue(),
-    position.SetPairListValue(),
-    size.SetPairListValue()
-  };
+  BackgroundParseState state(color, image.SetListValue(), repeat.SetListValue(),
+                             attachment.SetListValue(), clip.SetListValue(),
+                             origin.SetListValue(), position.SetPairListValue(),
+                             size.SetPairListValue());
 
   for (;;) {
     if (!ParseBackgroundItem(state)) {
       return PR_FALSE;
     }
     if (CheckEndProperty()) {
       break;
     }