nsCOMPtr<nsIStyleContext> parentContext; aParentFrame->GetStyleContext(getter_AddRefs(parentContext));
nsStyleContext* parentContext = aParentFrame->GetStyleContext();
GetInterFrameSpacingFor(nsIPresContext* aPresContext,                        PRInt32         aScriptLevel,                        nsIFrame*       aParentFrame,                        nsIFrame*       aChildFrame){  nsIFrame* childFrame;  aParentFrame->FirstChild(aPresContext, nsnull, &childFrame);  if (!childFrame || aChildFrame == childFrame)    return 0;  PRInt32 carrySpace = 0;  eMathMLFrameType fromFrameType = eMathMLFrameType_UNKNOWN;  nsCOMPtr<nsIAtom> childFrameType;  nsCOMPtr<nsIAtom> prevFrameType;  childFrame->GetFrameType(getter_AddRefs(childFrameType));  childFrame->GetNextSibling(&childFrame);  while (childFrame) {    prevFrameType = childFrameType;    childFrame->GetFrameType(getter_AddRefs(childFrameType));    nscoord space = GetInterFrameSpacing(aScriptLevel,      prevFrameType, childFrameType, &fromFrameType, &carrySpace);    if (aChildFrame == childFrame) {      // get thinspace      nsCOMPtr<nsIStyleContext> parentContext;      aParentFrame->GetStyleContext(getter_AddRefs(parentContext));      const nsStyleFont *font = NS_STATIC_CAST(const nsStyleFont*,        parentContext->GetStyleData(eStyleStruct_Font));      nscoord thinSpace = NSToCoordRound(float(font->mFont.size)*float(3) / float(18));      // we are done      return space * thinSpace;    }    childFrame->GetNextSibling(&childFrame);  }  NS_NOTREACHED("child not in the childlist of its parent");  return 0;}