nsCOMPtr<nsIPresShell> shell; state.GetPresShell(getter_AddRefs(shell));  float p2t; aPresContext->GetScaledPixelsToTwips(&p2t); nscoord onePixel = NSIntPixelsToTwips(1, p2t);   nsIBox* child = nsnull; mOuter->GetChildBox(&child); while(child) { SetPreferredSize(state, child, onePixel, aIsHorizontal, nsnull); child->GetNextBox(&child); }   for (int i=0; i < aCount; i++) { nscoord   pref       = aChildInfos[i].changed; nsIBox* childBox     = aChildInfos[i].child;  SetPreferredSize(state, childBox, onePixel, aIsHorizontal, &pref); }
nsSplitterFrameInner::AdjustChildren(nsIPresContext* aPresContext, nsSplitterInfo* aChildInfos, PRInt32 aCount, PRBool aIsHorizontal){    ///printf("------- AdjustChildren------\n");    nsBoxLayoutState state(aPresContext);    nsCOMPtr<nsIPresShell> shell;    state.GetPresShell(getter_AddRefs(shell));    float p2t;    aPresContext->GetScaledPixelsToTwips(&p2t);    nscoord onePixel = NSIntPixelsToTwips(1, p2t);    // first set all the widths.    nsIBox* child = nsnull;    mOuter->GetChildBox(&child);    while(child)    {      SetPreferredSize(state, child, onePixel, aIsHorizontal, nsnull);      child->GetNextBox(&child);    }    // now set our changed widths.    for (int i=0; i < aCount; i++)     {        nscoord   pref       = aChildInfos[i].changed;        nsIBox* childBox     = aChildInfos[i].child;        SetPreferredSize(state, childBox, onePixel, aIsHorizontal, &pref);    }}