Bug 388583. Fix regression with native scrollbar not being hooked up to tree mediator. r=smaug,sr=mats,a=mconnor
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@230618 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -325,8 +325,10 @@ nsNativeScrollbarFrame::Hookup()
|
||||
// We can't just pass 'mediator' to the widget, because 'mediator' might go away.
|
||||
// So pass a pointer to us. When we go away, we can tell the widget.
|
||||
nsIContent* scrollbarContent = parts.mScrollbarFrame->GetContent();
|
||||
// Always configure ourselves as the mediator even if parts.mMediator is null;
|
||||
// the mediator might be changed.
|
||||
scrollbar->SetContent(scrollbarContent,
|
||||
parts.mIScrollbarFrame, parts.mMediator ? this : nsnull);
|
||||
parts.mIScrollbarFrame, this);
|
||||
mScrollbarNeedsContent = PR_FALSE;
|
||||
|
||||
if (!scrollbarContent)
|
||||
|
||||
@@ -238,13 +238,11 @@ nsNativeScrollbar::DoScrollAction(ControlPartCode part)
|
||||
// lines. Outliner ignores the indexes in ScrollbarButtonPressed() except
|
||||
// to check if one is greater than the other to indicate direction.
|
||||
//
|
||||
UpdateContentPosition(newPos);
|
||||
if (mMediator) {
|
||||
BoundsCheck(0, newPos, mMaxValue);
|
||||
mMediator->ScrollbarButtonPressed(mScrollbar, oldPos, newPos);
|
||||
}
|
||||
else {
|
||||
UpdateContentPosition(newPos);
|
||||
}
|
||||
}
|
||||
else {
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user