mOrder = new nsVoidArray();
mOrder = new nsAutoVoidArray();
CSSDeclarationImpl::AppendStructValue(nsCSSProperty aProperty, void* aStruct){  NS_ASSERTION(nsnull != aStruct, "must have struct");  if (nsnull == aStruct) {    return NS_ERROR_NULL_POINTER;  }  nsresult result = NS_OK;  switch (aProperty) {    case eCSSProperty_cursor:      CSS_ENSURE(UserInterface) {        CSS_IF_DELETE(mUserInterface->mCursor);        mUserInterface->mCursor = (nsCSSValueList*)aStruct;      }      break;    case eCSSProperty_text_shadow:      CSS_ENSURE(Text) {        CSS_IF_DELETE(mText->mTextShadow);        mText->mTextShadow = (nsCSSShadow*)aStruct;      }      break;    case eCSSProperty_content:      CSS_ENSURE(Content) {        CSS_IF_DELETE(mContent->mContent);        mContent->mContent = (nsCSSValueList*)aStruct;      }      break;    case eCSSProperty_counter_increment:      CSS_ENSURE(Content) {        CSS_IF_DELETE(mContent->mCounterIncrement);        mContent->mCounterIncrement = (nsCSSCounterData*)aStruct;      }      break;    case eCSSProperty_counter_reset:      CSS_ENSURE(Content) {        CSS_IF_DELETE(mContent->mCounterReset);        mContent->mCounterReset = (nsCSSCounterData*)aStruct;      }      break;    case eCSSProperty_quotes:      CSS_ENSURE(Content) {        CSS_IF_DELETE(mContent->mQuotes);        mContent->mQuotes = (nsCSSQuotes*)aStruct;      }      break;    case eCSSProperty_key_equivalent:      CSS_ENSURE(UserInterface) {        CSS_IF_DELETE(mUserInterface->mKeyEquivalent);        mUserInterface->mKeyEquivalent = (nsCSSValueList*)aStruct;      }      break;    default:      NS_ERROR("not a struct property");      result = NS_ERROR_ILLEGAL_VALUE;      break;  }  if (NS_OK == result) {    if (nsnull == mOrder) {      mOrder = new nsVoidArray();    }    if (nsnull != mOrder) {      PRInt32 index = mOrder->IndexOf((void*)(PRInt32)aProperty);      if (-1 != index) {        mOrder->RemoveElementAt(index);      }      mOrder->AppendElement((void*)(PRInt32)aProperty);    }  }  return result;}