diff --git a/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.cpp b/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.cpp index 7f5dfca78fd..db6366768c6 100644 --- a/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.cpp +++ b/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.cpp @@ -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) diff --git a/mozilla/widget/src/mac/nsNativeScrollbar.cpp b/mozilla/widget/src/mac/nsNativeScrollbar.cpp index 43e503321e4..481012e9dbd 100644 --- a/mozilla/widget/src/mac/nsNativeScrollbar.cpp +++ b/mozilla/widget/src/mac/nsNativeScrollbar.cpp @@ -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 { //