case eCSSType_Shadow: { nsCSSShadow **source = NS_STATIC_CAST(nsCSSShadow**, v_source); nsCSSShadow **dest = NS_STATIC_CAST(nsCSSShadow**, v_dest); if (!nsCSSShadow::Equal(*source, *dest)) *aChanged = PR_TRUE; delete *dest; *dest = *source; *source = nsnull; } break;
CSSParserImpl::DoTransferTempData(nsCSSDeclaration* aDeclaration,                                  nsCSSProperty aPropID, PRBool aIsImportant,                                  PRBool aMustCallValueAppended,                                  PRBool* aChanged){  NS_ASSERTION(mTempData.HasPropertyBit(aPropID), "oops");  if (aIsImportant) {    if (!mData.HasImportantBit(aPropID))      *aChanged = PR_TRUE;    mData.SetImportantBit(aPropID);  } else {    if (mData.HasImportantBit(aPropID)) {      mTempData.ClearProperty(aPropID);      return;    }  }  if (aMustCallValueAppended || !mData.HasPropertyBit(aPropID)) {    aDeclaration->ValueAppended(aPropID);  }  mData.SetPropertyBit(aPropID);  mTempData.ClearPropertyBit(aPropID);  /*   * Save needless copying and allocation by calling the destructor in   * the destination, copying memory directly, and then using placement   * new.   */  void *v_source = mTempData.PropertyAt(aPropID);  void *v_dest = mData.PropertyAt(aPropID);  switch (nsCSSProps::kTypeTable[aPropID]) {    case eCSSType_Value: {      nsCSSValue *source = NS_STATIC_CAST(nsCSSValue*, v_source);      nsCSSValue *dest = NS_STATIC_CAST(nsCSSValue*, v_dest);      if (*source != *dest)        *aChanged = PR_TRUE;      dest->~nsCSSValue();      memcpy(dest, source, sizeof(nsCSSValue));      new (source) nsCSSValue();      if (dest->GetUnit() == eCSSUnit_Null) {        // Some of our property parsers actually want to _clear_ properties in        // mData (eg the "font" shorthand parser does for system fonts).  We've        // cleared the data; now clear the bit too.        mData.ClearPropertyBit(aPropID);      }    } break;    case eCSSType_Rect: {      nsCSSRect *source = NS_STATIC_CAST(nsCSSRect*, v_source);      nsCSSRect *dest = NS_STATIC_CAST(nsCSSRect*, v_dest);      if (*source != *dest)        *aChanged = PR_TRUE;      dest->~nsCSSRect();      memcpy(dest, source, sizeof(nsCSSRect));      new (source) nsCSSRect();    } break;    case eCSSType_ValuePair: {      nsCSSValuePair *source = NS_STATIC_CAST(nsCSSValuePair*, v_source);      nsCSSValuePair *dest = NS_STATIC_CAST(nsCSSValuePair*, v_dest);      if (*source != *dest)        *aChanged = PR_TRUE;      dest->~nsCSSValuePair();      memcpy(dest, source, sizeof(nsCSSValuePair));      new (source) nsCSSValuePair();    } break;    case eCSSType_ValueList: {      nsCSSValueList **source = NS_STATIC_CAST(nsCSSValueList**, v_source);      nsCSSValueList **dest = NS_STATIC_CAST(nsCSSValueList**, v_dest);      if (!nsCSSValueList::Equal(*source, *dest))        *aChanged = PR_TRUE;      delete *dest;      *dest = *source;      *source = nsnull;    } break;    case eCSSType_CounterData: {      nsCSSCounterData **source = NS_STATIC_CAST(nsCSSCounterData**, v_source);      nsCSSCounterData **dest = NS_STATIC_CAST(nsCSSCounterData**, v_dest);      if (!nsCSSCounterData::Equal(*source, *dest))        *aChanged = PR_TRUE;      delete *dest;      *dest = *source;      *source = nsnull;    } break;    case eCSSType_Quotes: {      nsCSSQuotes **source = NS_STATIC_CAST(nsCSSQuotes**, v_source);      nsCSSQuotes **dest = NS_STATIC_CAST(nsCSSQuotes**, v_dest);      if (!nsCSSQuotes::Equal(*source, *dest))        *aChanged = PR_TRUE;      delete *dest;      *dest = *source;      *source = nsnull;    } break;    case eCSSType_Shadow: {      nsCSSShadow **source = NS_STATIC_CAST(nsCSSShadow**, v_source);      nsCSSShadow **dest = NS_STATIC_CAST(nsCSSShadow**, v_dest);      if (!nsCSSShadow::Equal(*source, *dest))        *aChanged = PR_TRUE;      delete *dest;      *dest = *source;      *source = nsnull;    } break;  }}