nsRect parentRect; box->GetBounds(parentRect); child->GetBounds(aCaptionRect);
nsRect parentRect(box->GetRect()); aCaptionRect = child->GetRect();
nsGroupBoxFrame::GetCaptionBox(nsPresContext* aPresContext, nsRect& aCaptionRect){    // first child is our grouped area    nsIBox* box;    GetChildBox(&box);    // no area fail.    if (!box)      return nsnull;    // get the first child in the grouped area, that is the caption    box->GetChildBox(&box);    // nothing in the area? fail    if (!box)      return nsnull;    // now get the caption itself. It is in the caption frame.    nsIBox* child = nsnull;    box->GetChildBox(&child);    if (child) {       // convert to our coordinates.       nsRect parentRect;       box->GetBounds(parentRect);       child->GetBounds(aCaptionRect);       aCaptionRect.x += parentRect.x;       aCaptionRect.y += parentRect.y;    }    return child;}