mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1055548 - Round the APZ tap notifications to integer CSS pixels before sending to JS code. r=wesj
--HG-- extra : rebase_source : 8b8bdc94bedf21f45d9add82436fa98683b26a03
This commit is contained in:
parent
77ad21d7fc
commit
0735cf9d8c
@ -122,7 +122,8 @@ APZCCallbackHandler::HandleDoubleTap(const CSSPoint& aPoint,
|
||||
int32_t aModifiers,
|
||||
const mozilla::layers::ScrollableLayerGuid& aGuid)
|
||||
{
|
||||
nsCString data = nsPrintfCString("{ \"x\": %d, \"y\": %d }", aPoint.x, aPoint.y);
|
||||
CSSIntPoint point = RoundedToInt(aPoint);
|
||||
nsCString data = nsPrintfCString("{ \"x\": %d, \"y\": %d }", point.x, point.y);
|
||||
nsAppShell::gAppShell->PostEvent(AndroidGeckoEvent::MakeBroadcastEvent(
|
||||
NS_LITERAL_CSTRING("Gesture:DoubleTap"), data));
|
||||
}
|
||||
@ -133,7 +134,8 @@ APZCCallbackHandler::HandleSingleTap(const CSSPoint& aPoint,
|
||||
const mozilla::layers::ScrollableLayerGuid& aGuid)
|
||||
{
|
||||
// FIXME Send the modifier data to Gecko for use in mouse events.
|
||||
nsCString data = nsPrintfCString("{ \"x\": %d, \"y\": %d }", aPoint.x, aPoint.y);
|
||||
CSSIntPoint point = RoundedToInt(aPoint);
|
||||
nsCString data = nsPrintfCString("{ \"x\": %d, \"y\": %d }", point.x, point.y);
|
||||
nsAppShell::gAppShell->PostEvent(AndroidGeckoEvent::MakeBroadcastEvent(
|
||||
NS_LITERAL_CSTRING("Gesture:SingleTap"), data));
|
||||
}
|
||||
@ -144,7 +146,8 @@ APZCCallbackHandler::HandleLongTap(const CSSPoint& aPoint,
|
||||
const mozilla::layers::ScrollableLayerGuid& aGuid)
|
||||
{
|
||||
// TODO send content response back to APZC
|
||||
nsCString data = nsPrintfCString("{ \"x\": %d, \"y\": %d }", aPoint.x, aPoint.y);
|
||||
CSSIntPoint point = RoundedToInt(aPoint);
|
||||
nsCString data = nsPrintfCString("{ \"x\": %d, \"y\": %d }", point.x, point.y);
|
||||
nsAppShell::gAppShell->PostEvent(AndroidGeckoEvent::MakeBroadcastEvent(
|
||||
NS_LITERAL_CSTRING("Gesture:LongPress"), data));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user