mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out rev 2a35bcdd7c1e (bug 716793) to fix orange tests
This commit is contained in:
parent
2f61f3ff7a
commit
9d2b67a38b
@ -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;
|
||||
}
|
||||
|
@ -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…
Reference in New Issue
Block a user