nsCOMPtr<nsIStyleContext> parentContext = aRuleData->mStyleContext->GetParent();
nsStyleContext* parentContext = aRuleData->mStyleContext->GetParent();
static void PostResolveCallback(nsStyleStruct* aStyleStruct, nsRuleData* aRuleData){  nsStyleText* text = (nsStyleText*)aStyleStruct;  if (text->mTextAlign == NS_STYLE_TEXT_ALIGN_DEFAULT) {    nsCOMPtr<nsIStyleContext> parentContext = aRuleData->mStyleContext->GetParent();    if (parentContext) {      const nsStyleText* parentStyleText =           (const nsStyleText*)parentContext->GetStyleData(eStyleStruct_Text);      PRUint8 parentAlign = parentStyleText->mTextAlign;      text->mTextAlign = (NS_STYLE_TEXT_ALIGN_DEFAULT == parentAlign)                              ? NS_STYLE_TEXT_ALIGN_CENTER : parentAlign;    }  }}