Skip to content

Commit

Permalink
Cleanup obsoleted mouse event disptaching method
Browse files Browse the repository at this point in the history
If similar needed APZCCallbackHelper::FireSingleTapEvent should be used
instead.
  • Loading branch information
rainemak committed Apr 5, 2019
1 parent edf708d commit 4d92b3b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 1 addition & 19 deletions embedding/embedlite/embedshared/EmbedLiteViewBaseChild.cpp
Expand Up @@ -1310,25 +1310,7 @@ EmbedLiteViewBaseChild::GetPresShellResolution() const
}

void
EmbedLiteViewBaseChild::DispatchSynthesizedMouseEvent(const WidgetTouchEvent& aEvent)
{
// TODO : how should we handle now global mouse event prevent.
// if (nsIPresShell::gPreventMouseEvents) {
// return;
// }

if (aEvent.mMessage == eTouchEnd) {
int64_t time = aEvent.time;
MOZ_ASSERT(aEvent.touches.Length() == 1);
LayoutDevicePoint pt = aEvent.touches[0]->mRefPoint;
Modifiers m;
APZCCallbackHelper::DispatchSynthesizedMouseEvent(eMouseMove, time, pt, m, aEvent.widget);
APZCCallbackHelper::DispatchSynthesizedMouseEvent(eMouseDown, time, pt, m, aEvent.widget);
APZCCallbackHelper::DispatchSynthesizedMouseEvent(eMouseUp, time, pt, m, aEvent.widget);
}
}

void EmbedLiteViewBaseChild::WidgetBoundsChanged(const nsIntRect& aSize)
EmbedLiteViewBaseChild::WidgetBoundsChanged(const nsIntRect& aSize)
{
LOGT("sz[%d,%d]", aSize.width, aSize.height);
MOZ_ASSERT(mHelper && mWebBrowser);
Expand Down
2 changes: 0 additions & 2 deletions embedding/embedlite/embedshared/EmbedLiteViewBaseChild.h
Expand Up @@ -194,8 +194,6 @@ class EmbedLiteViewBaseChild : public PEmbedLiteViewChild,
// Get the pres shell resolution of the document in this tab.
float GetPresShellResolution() const;

void DispatchSynthesizedMouseEvent(const WidgetTouchEvent&);

// EmbedLitePuppetWidgetObserver
void WidgetBoundsChanged(const nsIntRect&) override;

Expand Down

0 comments on commit 4d92b3b

Please sign in to comment.