return NS_ERROR_NOT_IMPLEMENTED;
nsIScrollableView* scrollableView = GetScrollableView(); if (!scrollableView) return NS_ERROR_FAILURE;   nsCOMPtr<nsIPresContext> context; mPresShell->GetPresContext(getter_AddRefs(context)); float pixelsToTwips = 0.0; context->GetPixelsToTwips(&pixelsToTwips);   nsIFrame* frame = GetFrame(); nsCOMPtr<nsIBox> box (do_QueryInterface(frame));  nsRect rect, crect; nsIBox* scrolledBox; nsCOMPtr<nsIDOMXULElement> childDOMXULElement (do_QueryInterface(child)); nsIBoxObject * childBoxObject; childDOMXULElement->GetBoxObject(&childBoxObject);  PRInt32 x,y,width,height; childBoxObject->GetX(&x); childBoxObject->GetY(&y); childBoxObject->GetWidth(&width); childBoxObject->GetHeight(&height);  rect.x = NSToIntRound(x * pixelsToTwips); rect.y = NSToIntRound(y * pixelsToTwips); rect.width = NSToIntRound(width * pixelsToTwips); rect.height = NSToIntRound(height * pixelsToTwips);   box->GetChildBox(&scrolledBox);     PRBool horiz = PR_FALSE; scrolledBox->GetOrientation(horiz);  nsPoint cp; scrollableView->GetScrollPosition(cp.x,cp.y); GetOffsetRect(crect); crect.x = NSToIntRound(crect.x * pixelsToTwips); crect.y = NSToIntRound(crect.y * pixelsToTwips); crect.width = NSToIntRound(crect.width * pixelsToTwips); crect.height = NSToIntRound(crect.height * pixelsToTwips);   nscoord newx=cp.x, newy=cp.y;   if (horiz) { if (rect.x + rect.width > cp.x + crect.width) { newx = cp.x + ((rect.x + rect.width)-(cp.x + crect.width)); } else if (rect.x < cp.x) { newx = rect.x; } } else { if (rect.y + rect.height > cp.y + crect.height) { newx = cp.y + ((rect.y + rect.height)-(cp.y + crect.height)); } else if (rect.y < cp.y) { newy = rect.y; } }   return scrollableView->ScrollTo(newx, newy, NS_SCROLL_PROPERTY_ALWAYS_BLIT);
NS_IMETHODIMP nsScrollBoxObject::EnsureElementIsVisible(nsIDOMElement *child){    return NS_ERROR_NOT_IMPLEMENTED;}