nsStyleSpacing* spacing = (nsStyleSpacing*) aContext->GetMutableStyleData(eStyleStruct_Spacing); if (spacing) { spacing->SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_NONE); spacing->SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_NONE); spacing->SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_NONE); spacing->SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_NONE);
nsStyleDisplay* display = (nsStyleDisplay*) aContext->GetMutableStyleData(eStyleStruct_Display); if (parentContext) { const nsStyleDisplay* parentDisplay = (const nsStyleDisplay*) parentContext->GetStyleData(eStyleStruct_Display); if (parentDisplay) { display->mDirection = parentDisplay->mDirection; }
CSSFirstLetterRule::MapStyleInto(nsIStyleContext* aContext,                                 nsIPresContext* aPresContext){  // These properties apply: font-properties, color-properties,  // backgorund-properties, word-spacing, letter-spacing,  // text-decoration, vertical-align, text-transform, line-height,  // text-shadow, and clear.  //  // Everything else doesn't apply.  // Disable border  nsStyleSpacing* spacing = (nsStyleSpacing*)    aContext->GetMutableStyleData(eStyleStruct_Spacing);  if (spacing) {    spacing->SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_NONE);    spacing->SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_NONE);    spacing->SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_NONE);    spacing->SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_NONE);  }  return NS_OK;}