if (nsnull != styleColor) { styleColor->mColor = mColor;
if (parentContext) { nsStyleText* styleText = (nsStyleText*)aContext->GetMutableStyleData(eStyleStruct_Text); if (NS_STYLE_TEXT_ALIGN_DEFAULT == styleText->mTextAlign) { const nsStyleText* parentStyleText = (const nsStyleText*)parentContext->GetStyleData(eStyleStruct_Text); PRUint8 parentAlign = parentStyleText->mTextAlign; styleText->mTextAlign = (NS_STYLE_TEXT_ALIGN_DEFAULT == parentAlign) ? NS_STYLE_TEXT_ALIGN_CENTER : parentAlign; } NS_RELEASE(parentContext);
HTMLColorRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext){  nsStyleColor* styleColor = (nsStyleColor*)(aContext->GetMutableStyleData(eStyleStruct_Color));  if (nsnull != styleColor) {    styleColor->mColor = mColor;  }  return NS_OK;}