if (aColor.mBackInlinePolicy.GetUnit() == eCSSUnit_Null && ourColor->mBackInlinePolicy.GetUnit() != eCSSUnit_Null) aColor.mBackInlinePolicy = ourColor->mBackInlinePolicy;
MapColorForDeclaration(nsCSSDeclaration* aDecl, const nsStyleStructID& aID, nsRuleDataColor& aColor){  if (!aDecl)    return NS_OK;  nsCSSColor* ourColor = (nsCSSColor*)aDecl->GetData(kCSSColorSID);  if (!ourColor)    return NS_OK; // No rules for color or background.  if (aID == eStyleStruct_Color) {    // color: color, string, inherit    if (aColor.mColor.GetUnit() == eCSSUnit_Null && ourColor->mColor.GetUnit() != eCSSUnit_Null)      aColor.mColor = ourColor->mColor;  }  else if (aID == eStyleStruct_Background) {    // background-color: color, string, enum (flags), inherit    if (aColor.mBackColor.GetUnit() == eCSSUnit_Null && ourColor->mBackColor.GetUnit() != eCSSUnit_Null)      aColor.mBackColor = ourColor->mBackColor;    // background-image: url, none, inherit    if (aColor.mBackImage.GetUnit() == eCSSUnit_Null && ourColor->mBackImage.GetUnit() != eCSSUnit_Null)      aColor.mBackImage = ourColor->mBackImage;    // background-repeat: enum, inherit    if (aColor.mBackRepeat.GetUnit() == eCSSUnit_Null && ourColor->mBackRepeat.GetUnit() != eCSSUnit_Null)      aColor.mBackRepeat = ourColor->mBackRepeat;    // background-attachment: enum, inherit    if (aColor.mBackAttachment.GetUnit() == eCSSUnit_Null && ourColor->mBackAttachment.GetUnit() != eCSSUnit_Null)      aColor.mBackAttachment = ourColor->mBackAttachment;          // background-position: enum, length, percent (flags), inherit    if (aColor.mBackPositionX.GetUnit() == eCSSUnit_Null && ourColor->mBackPositionX.GetUnit() != eCSSUnit_Null)      aColor.mBackPositionX = ourColor->mBackPositionX;    if (aColor.mBackPositionY.GetUnit() == eCSSUnit_Null && ourColor->mBackPositionY.GetUnit() != eCSSUnit_Null)      aColor.mBackPositionY = ourColor->mBackPositionY;    // background-clip: enum, inherit    if (aColor.mBackClip.GetUnit() == eCSSUnit_Null && ourColor->mBackClip.GetUnit() != eCSSUnit_Null)      aColor.mBackClip = ourColor->mBackClip;    // background-origin: enum, inherit    if (aColor.mBackOrigin.GetUnit() == eCSSUnit_Null && ourColor->mBackOrigin.GetUnit() != eCSSUnit_Null)      aColor.mBackOrigin = ourColor->mBackOrigin;  }  return NS_OK;}