PRInt32         aHint)
nsChangeHint    aHint)
nsGfxScrollFrameInner::AttributeChanged(nsIDocument *aDocument,                              nsIContent*     aContent,                              PRInt32         aNameSpaceID,                              nsIAtom*        aAttribute,                              PRInt32         aModType,                              PRInt32         aHint) {   if (mHScrollbarBox && mVScrollbarBox && (mHasHorizontalScrollbar || mHasVerticalScrollbar))   {     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));     nsIFrame  * targetFrame = nsnull;     nsCOMPtr<nsIContent> targetContent;     if (hcontent.get() == aContent  || vcontent.get() == aContent)     {        nscoord x = 0;        nscoord y = 0;        nsAutoString value;        if (NS_CONTENT_ATTR_HAS_VALUE == hcontent->GetAttr(kNameSpaceID_None, nsXULAtoms::curpos, value))        {           PRInt32 error;           // convert it to an integer           x = value.ToInteger(&error);           targetFrame = hframe;           targetContent = hcontent;        }        if (NS_CONTENT_ATTR_HAS_VALUE == vcontent->GetAttr(kNameSpaceID_None, nsXULAtoms::curpos, value))        {           PRInt32 error;           // convert it to an integer           y = value.ToInteger(&error);           targetFrame = vframe;           targetContent = vcontent;        }        nsScrollbarEvent  event;        event.eventStructType = NS_SCROLLBAR_EVENT;        event.message = NS_SCROLL_EVENT;        event.flags = 0;                nsEventStatus status = nsEventStatus_eIgnore;        nsCOMPtr<nsIPresShell> presShell;        mOuter->mPresContext->GetShell(getter_AddRefs(presShell));                // Fire the onScroll event.        if (presShell && targetFrame && targetContent)          presShell->HandleEventWithTarget(&event, targetFrame, targetContent,                                            NS_EVENT_FLAG_INIT, &status);        nsIScrollableView* s = GetScrollableView(mOuter->mPresContext);        s->RemoveScrollPositionListener(this);        ScrollbarChanged(mOuter->mPresContext, x*mOnePixel, y*mOnePixel);        s->AddScrollPositionListener(this);     }   }   return NS_OK;}