Backed out changeset 9d6577fd74f3 (bug 1257319)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 23 Mar 2016 10:55:08 +0100
changeset 290074 e5ef1d7db142eadfb6c86d7c9a22e1e0382fdef5
parent 290073 c539b5bbdb36e84e59846a8c5339e4fada2ce0ee
child 290075 f7d63892ad2c2dc18314ea6ba5f9c7db2f90cc3d
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1257319
milestone48.0a1
backs out9d6577fd74f3cd1fb026623a53d18dccd4588e53
Backed out changeset 9d6577fd74f3 (bug 1257319)
widget/android/AndroidContentController.cpp
--- a/widget/android/AndroidContentController.cpp
+++ b/widget/android/AndroidContentController.cpp
@@ -65,27 +65,19 @@ AndroidContentController::HandleSingleTa
             // We need to convert from the root document to the root content document,
             // by unapplying the resolution that's on the content document.
             const float resolution = shell->GetResolution();
             point.x /= resolution;
             point.y /= resolution;
         }
 
         CSSIntPoint rounded = RoundedToInt(point);
-        nsAppShell::PostEvent([rounded] {
-            nsCOMPtr<nsIObserverService> obsServ =
-                mozilla::services::GetObserverService();
-            if (!obsServ) {
-                return;
-            }
-
-            nsPrintfCString data("{\"x\":%d,\"y\":%d}", rounded.x, rounded.y);
-            obsServ->NotifyObservers(nullptr, "Gesture:SingleTap",
-                                     NS_ConvertASCIItoUTF16(data).get());
-        });
+        nsCString data = nsPrintfCString("{ \"x\": %d, \"y\": %d }", rounded.x, rounded.y);
+        nsAppShell::PostEvent(AndroidGeckoEvent::MakeBroadcastEvent(
+                NS_LITERAL_CSTRING("Gesture:SingleTap"), data));
     }
 
     ChromeProcessController::HandleSingleTap(aPoint, aModifiers, aGuid);
 }
 
 void
 AndroidContentController::PostDelayedTask(Task* aTask, int aDelayMs)
 {