mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 416510 - "nsSliderFrame should use nsCOMPtr for its mMediator" [p=kayjay@poczta.fm (kayjay) r+sr=roc a1.9=schrep]
This commit is contained in:
parent
e7b97c3e18
commit
ca7d34dbff
@ -95,8 +95,7 @@ nsSliderFrame::nsSliderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||||||
nsBoxFrame(aPresShell, aContext),
|
nsBoxFrame(aPresShell, aContext),
|
||||||
mCurPos(0),
|
mCurPos(0),
|
||||||
mScrollbarListener(nsnull),
|
mScrollbarListener(nsnull),
|
||||||
mChange(0),
|
mChange(0)
|
||||||
mMediator(nsnull)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -955,7 +954,6 @@ nsSliderFrame::AddListener()
|
|||||||
{
|
{
|
||||||
if (!mMediator) {
|
if (!mMediator) {
|
||||||
mMediator = new nsSliderMediator(this);
|
mMediator = new nsSliderMediator(this);
|
||||||
NS_ADDREF(mMediator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIFrame* thumbFrame = mFrames.FirstChild();
|
nsIFrame* thumbFrame = mFrames.FirstChild();
|
||||||
@ -1027,7 +1025,6 @@ nsSliderFrame::Destroy()
|
|||||||
// tell our mediator if we have one we are gone.
|
// tell our mediator if we have one we are gone.
|
||||||
if (mMediator) {
|
if (mMediator) {
|
||||||
mMediator->SetSlider(nsnull);
|
mMediator->SetSlider(nsnull);
|
||||||
NS_RELEASE(mMediator);
|
|
||||||
mMediator = nsnull;
|
mMediator = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ private:
|
|||||||
|
|
||||||
nscoord mChange;
|
nscoord mChange;
|
||||||
nsPoint mDestinationPoint;
|
nsPoint mDestinationPoint;
|
||||||
nsSliderMediator* mMediator;
|
nsRefPtr<nsSliderMediator> mMediator;
|
||||||
|
|
||||||
static PRBool gMiddlePref;
|
static PRBool gMiddlePref;
|
||||||
static PRInt32 gSnapMultiplier;
|
static PRInt32 gSnapMultiplier;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user