Bug 1265551 - Autocomplete popup lags behind pan/zoom position r=kats
authorRandall Barker <rbarker@mozilla.com>
Mon, 18 Apr 2016 17:08:47 -0700
changeset 331783 61fbe83d308379611bef742a9c607a4583187f48
parent 331782 a1a6a81a37b7a226edbfe2f8b70b44395a14c2e1
child 331784 75c314efec3ed7459e97afba357f8066a4137b93
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1265551
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1265551 - Autocomplete popup lags behind pan/zoom position r=kats
widget/android/AndroidContentController.cpp
--- a/widget/android/AndroidContentController.cpp
+++ b/widget/android/AndroidContentController.cpp
@@ -120,18 +120,23 @@ AndroidContentController::NotifyAPZState
                                                APZStateChange aChange,
                                                int aArg)
 {
   // This function may get invoked twice, if the first invocation is not on
   // the main thread then the ChromeProcessController version of this function
   // will redispatch to the main thread. We want to make sure that our handling
   // only happens on the main thread.
   ChromeProcessController::NotifyAPZStateChange(aGuid, aChange, aArg);
-  if (NS_IsMainThread() && aChange == layers::GeckoContentController::APZStateChange::TransformEnd) {
-    // This is used by tests to determine when the APZ is done doing whatever
-    // it's doing. XXX generify this as needed when writing additional tests.
+  if (NS_IsMainThread()) {
     nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
-    observerService->NotifyObservers(nullptr, "APZ:TransformEnd", nullptr);
+    if (aChange == layers::GeckoContentController::APZStateChange::TransformEnd) {
+      // This is used by tests to determine when the APZ is done doing whatever
+      // it's doing. XXX generify this as needed when writing additional tests.
+      observerService->NotifyObservers(nullptr, "APZ:TransformEnd", nullptr);
+      observerService->NotifyObservers(nullptr, "PanZoom:StateChange", MOZ_UTF16("NOTHING"));
+    } else if (aChange == layers::GeckoContentController::APZStateChange::TransformBegin) {
+      observerService->NotifyObservers(nullptr, "PanZoom:StateChange", MOZ_UTF16("PANNING"));
+    }
   }
 }
 
 } // namespace widget
 } // namespace mozilla