mMargin.Reset(); mPadding.Reset(); nsStyleCoord  medium(NS_STYLE_BORDER_WIDTH_MEDIUM, eStyleUnit_Enumerated); mBorder.SetLeft(medium); mBorder.SetTop(medium); mBorder.SetRight(medium); mBorder.SetBottom(medium);   mBorderStyle[0] = NS_STYLE_BORDER_STYLE_NONE; mBorderStyle[1] = NS_STYLE_BORDER_STYLE_NONE; mBorderStyle[2] = NS_STYLE_BORDER_STYLE_NONE; mBorderStyle[3] = NS_STYLE_BORDER_STYLE_NONE;   mBorderColor[0] = NS_RGB(0, 0, 0); mBorderColor[1] = NS_RGB(0, 0, 0); mBorderColor[2] = NS_RGB(0, 0, 0); mBorderColor[3] = NS_RGB(0, 0, 0);  mBorderRadius.SetCoordValue(0);  mOutlineWidth = medium; mOutlineStyle = NS_STYLE_BORDER_STYLE_NONE; mOutlineColor = NS_RGB(0, 0, 0);  mHasCachedMargin = PR_FALSE; mHasCachedPadding = PR_FALSE; mHasCachedBorder = PR_FALSE; mHasCachedOutline = PR_FALSE;
else { aPresContext->GetDefaultFont(mFont); aPresContext->GetDefaultFixedFont(mFixedFont); mFlags = NS_STYLE_FONT_DEFAULT; }
void StyleSpacingImpl::ResetFrom(const nsStyleSpacing* aParent, nsIPresContext* aPresContext){  // XXX support kBorderWidhts until deprecated methods are removed  if (! kWidthsInitialized) {    float pixelsToTwips = 20.0f;    if (aPresContext) {      aPresContext->GetPixelsToTwips(&pixelsToTwips);    }    kBorderWidths[NS_STYLE_BORDER_WIDTH_THIN] = NSIntPixelsToTwips(1, pixelsToTwips);    kBorderWidths[NS_STYLE_BORDER_WIDTH_MEDIUM] = NSIntPixelsToTwips(3, pixelsToTwips);    kBorderWidths[NS_STYLE_BORDER_WIDTH_THICK] = NSIntPixelsToTwips(5, pixelsToTwips);    kWidthsInitialized = PR_TRUE;  }  // spacing values not inherited  mMargin.Reset();  mPadding.Reset();  nsStyleCoord  medium(NS_STYLE_BORDER_WIDTH_MEDIUM, eStyleUnit_Enumerated);  mBorder.SetLeft(medium);  mBorder.SetTop(medium);  mBorder.SetRight(medium);  mBorder.SetBottom(medium);    mBorderStyle[0] = NS_STYLE_BORDER_STYLE_NONE;    mBorderStyle[1] = NS_STYLE_BORDER_STYLE_NONE;   mBorderStyle[2] = NS_STYLE_BORDER_STYLE_NONE;   mBorderStyle[3] = NS_STYLE_BORDER_STYLE_NONE;      mBorderColor[0] = NS_RGB(0, 0, 0);    mBorderColor[1] = NS_RGB(0, 0, 0);    mBorderColor[2] = NS_RGB(0, 0, 0);    mBorderColor[3] = NS_RGB(0, 0, 0);   mBorderRadius.SetCoordValue(0);  mOutlineWidth = medium;  mOutlineStyle = NS_STYLE_BORDER_STYLE_NONE;  mOutlineColor = NS_RGB(0, 0, 0);    mHasCachedMargin = PR_FALSE;  mHasCachedPadding = PR_FALSE;  mHasCachedBorder = PR_FALSE;  mHasCachedOutline = PR_FALSE;}