Loading layout/base/nsPresShell.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -5255,8 +5255,7 @@ void PresShell::SynthesizeMouseMove(bool aFromScroll) nsRefPtr<nsSynthMouseMoveEvent> ev = new nsSynthMouseMoveEvent(this, aFromScroll); if (!GetPresContext()->RefreshDriver()->AddRefreshObserver(ev, Flush_Display)) { if (NS_FAILED(NS_DispatchToCurrentThread(ev))) { NS_WARNING("failed to dispatch nsSynthMouseMoveEvent"); return; } Loading layout/base/nsPresShell.h +4 −15 Original line number Diff line number Diff line Loading @@ -852,28 +852,17 @@ private: // over our window or there is no last observed mouse location for some // reason. nsPoint mMouseLocation; class nsSynthMouseMoveEvent : public nsARefreshObserver { class nsSynthMouseMoveEvent : public nsRunnable { public: nsSynthMouseMoveEvent(PresShell* aPresShell, bool aFromScroll) : mPresShell(aPresShell), mFromScroll(aFromScroll) { NS_ASSERTION(mPresShell, "null parameter"); } ~nsSynthMouseMoveEvent() { Revoke(); } NS_INLINE_DECL_REFCOUNTING(nsSynthMouseMoveEvent) void Revoke() { if (mPresShell) { mPresShell->GetPresContext()->RefreshDriver()-> RemoveRefreshObserver(this, Flush_Display); mPresShell = nsnull; } } virtual void WillRefresh(mozilla::TimeStamp aTime) { void Revoke() { mPresShell = nsnull; } NS_IMETHOD Run() { if (mPresShell) mPresShell->ProcessSynthMouseMoveEvent(mFromScroll); return NS_OK; } private: PresShell* mPresShell; Loading Loading
layout/base/nsPresShell.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -5255,8 +5255,7 @@ void PresShell::SynthesizeMouseMove(bool aFromScroll) nsRefPtr<nsSynthMouseMoveEvent> ev = new nsSynthMouseMoveEvent(this, aFromScroll); if (!GetPresContext()->RefreshDriver()->AddRefreshObserver(ev, Flush_Display)) { if (NS_FAILED(NS_DispatchToCurrentThread(ev))) { NS_WARNING("failed to dispatch nsSynthMouseMoveEvent"); return; } Loading
layout/base/nsPresShell.h +4 −15 Original line number Diff line number Diff line Loading @@ -852,28 +852,17 @@ private: // over our window or there is no last observed mouse location for some // reason. nsPoint mMouseLocation; class nsSynthMouseMoveEvent : public nsARefreshObserver { class nsSynthMouseMoveEvent : public nsRunnable { public: nsSynthMouseMoveEvent(PresShell* aPresShell, bool aFromScroll) : mPresShell(aPresShell), mFromScroll(aFromScroll) { NS_ASSERTION(mPresShell, "null parameter"); } ~nsSynthMouseMoveEvent() { Revoke(); } NS_INLINE_DECL_REFCOUNTING(nsSynthMouseMoveEvent) void Revoke() { if (mPresShell) { mPresShell->GetPresContext()->RefreshDriver()-> RemoveRefreshObserver(this, Flush_Display); mPresShell = nsnull; } } virtual void WillRefresh(mozilla::TimeStamp aTime) { void Revoke() { mPresShell = nsnull; } NS_IMETHOD Run() { if (mPresShell) mPresShell->ProcessSynthMouseMoveEvent(mFromScroll); return NS_OK; } private: PresShell* mPresShell; Loading