mFont.ResetFrom(nsnull, aPresContext);
if (mDisplay.mDisplay != NS_STYLE_DISPLAY_TABLE) { mFont.ResetFrom(nsnull, aPresContext); }
StyleContextImpl::RemapStyle(nsIPresContext* aPresContext){  mDataCode = -1;  if (nsnull != mParent) {    mFont.ResetFrom(&(mParent->mFont), aPresContext);    mColor.ResetFrom(&(mParent->mColor), aPresContext);    mSpacing.ResetFrom(&(mParent->mSpacing), aPresContext);    mList.ResetFrom(&(mParent->mList), aPresContext);    mText.ResetFrom(&(mParent->mText), aPresContext);    mPosition.ResetFrom(&(mParent->mPosition), aPresContext);    mDisplay.ResetFrom(&(mParent->mDisplay), aPresContext);  }  else {    mFont.ResetFrom(nsnull, aPresContext);    mColor.ResetFrom(nsnull, aPresContext);    mSpacing.ResetFrom(nsnull, aPresContext);    mList.ResetFrom(nsnull, aPresContext);    mText.ResetFrom(nsnull, aPresContext);    mPosition.ResetFrom(nsnull, aPresContext);    mDisplay.ResetFrom(nsnull, aPresContext);  }  if ((nsnull != mRules) && (0 < mRules->Count())) {    MapStyleData  data(this, aPresContext);    mRules->EnumerateForwards(MapStyleRule, &data);  }  if (-1 == mDataCode) {    mDataCode = 0;  }  nsCompatibility quirkMode = eCompatibility_Standard;  aPresContext->GetCompatibilityMode(quirkMode);  if (eCompatibility_NavQuirks == quirkMode) {    if ((mDisplay.mDisplay == NS_STYLE_DISPLAY_TABLE) ||         (mDisplay.mDisplay == NS_STYLE_DISPLAY_TABLE_CAPTION)) {      // time to emulate a sub-document      // This is ugly, but we need to map style once to determine display type      // then reset and map it again so that all local style is preserved      mFont.ResetFrom(nsnull, aPresContext);      mColor.ResetFrom(nsnull, aPresContext);      mSpacing.ResetFrom(nsnull, aPresContext);      mList.ResetFrom(nsnull, aPresContext);      mText.ResetFrom(nsnull, aPresContext);      mPosition.ResetFrom(nsnull, aPresContext);      mDisplay.ResetFrom(nsnull, aPresContext);      if ((nsnull != mRules) && (0 < mRules->Count())) {        MapStyleData  data(this, aPresContext);        mRules->EnumerateForwards(MapStyleRule, &data);      }    }  }  RecalcAutomaticData(aPresContext);  if (nsnull != mChild) {    StyleContextImpl* child = mChild;    do {      child->RemapStyle(aPresContext);      child = child->mNextSibling;    } while (mChild != child);  }  if (nsnull != mEmptyChild) {    StyleContextImpl* child = mEmptyChild;    do {      child->RemapStyle(aPresContext);      child = child->mNextSibling;    } while (mEmptyChild != child);  }  return NS_OK;}