s->AddScrollPositionListener(this);
nsGfxScrollFrameInner::AttributeChanged(nsIDocument *aDocument,                              nsIContent*     aContent,                              PRInt32         aNameSpaceID,                              nsIAtom*        aAttribute,                              PRInt32         aHint) {   if (mHScrollbarBox && mVScrollbarBox)   {     nsIFrame* hframe = nsnull;     mHScrollbarBox->GetFrame(&hframe);     nsIFrame* vframe = nsnull;     mVScrollbarBox->GetFrame(&vframe);     nsCOMPtr<nsIContent> vcontent;     nsCOMPtr<nsIContent> hcontent;     hframe->GetContent(getter_AddRefs(hcontent));     vframe->GetContent(getter_AddRefs(vcontent));     if (hcontent.get() == aContent  || vcontent.get() == aContent)     {        nscoord x = 0;        nscoord y = 0;        nsAutoString value;        if (NS_CONTENT_ATTR_HAS_VALUE == hcontent->GetAttribute(kNameSpaceID_None, nsXULAtoms::curpos, value))        {           PRInt32 error;           // convert it to an integer           x = value.ToInteger(&error);        }        if (NS_CONTENT_ATTR_HAS_VALUE == vcontent->GetAttribute(kNameSpaceID_None, nsXULAtoms::curpos, value))        {           PRInt32 error;           // convert it to an integer           y = value.ToInteger(&error);        }        ScrollbarChanged(mOuter->mPresContext, x*mOnePixel, y*mOnePixel);     }   }   return NS_OK;}