theFrame->FirstChild(aPresContext, nsnull, &theFrame);
theFrame = theFrame->GetFirstChild(nsnull);
GetRootScrollFrame(nsIPresContext* aPresContext, nsIFrame* aRootFrame, nsIFrame** aScrollFrame) {  // Frames: viewport->scroll->scrollport (Gfx) or viewport->scroll (Native)  // Types:  viewport->scroll->sroll               viewport->scroll  // Ensure root frame is a viewport frame  *aScrollFrame = nsnull;  nsIFrame* theFrame = nsnull;  if (aRootFrame) {    if (nsLayoutAtoms::viewportFrame == aRootFrame->GetType()) {      // If child is scrollframe keep it (native)      aRootFrame->FirstChild(aPresContext, nsnull, &theFrame);      if (theFrame) {        if (nsLayoutAtoms::scrollFrame == theFrame->GetType()) {          *aScrollFrame = theFrame;          // If the first child of that is scrollframe, use it instead (gfx)          theFrame->FirstChild(aPresContext, nsnull, &theFrame);          if (theFrame) {            if (nsLayoutAtoms::scrollFrame == theFrame->GetType()) {              *aScrollFrame = theFrame;            }          }        }      }    }  }  return NS_OK;}