Backed out changeset c61753316ddb (bug 1109985)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 16 Dec 2014 09:39:39 +0100
changeset 219911 d0ac9d1745f9f04cd39b0209c60df3afa35ccfc7
parent 219910 fbe8cde84b7722063bdbd0789faf74daa02c0d3a
child 219912 b2649ad7d86e7278268fb33b05911e4864850bf3
push id10419
push usercbook@mozilla.com
push dateTue, 16 Dec 2014 12:45:27 +0000
treeherderfx-team@ec87657146eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1109985
milestone37.0a1
backs outc61753316ddb6325779d733e558abd49c6061a80
Backed out changeset c61753316ddb (bug 1109985)
dom/ipc/TabParent.cpp
gfx/layers/apz/src/InputQueue.cpp
widget/windows/nsWindow.cpp
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -14,17 +14,16 @@
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/PContentPermissionRequestParent.h"
 #include "mozilla/dom/indexedDB/ActorsParent.h"
 #include "mozilla/plugins/PluginWidgetParent.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/Hal.h"
 #include "mozilla/ipc/DocumentRendererParent.h"
 #include "mozilla/layers/CompositorParent.h"
-#include "mozilla/layers/InputAPZContext.h"
 #include "mozilla/layout/RenderFrameParent.h"
 #include "mozilla/MouseEvents.h"
 #include "mozilla/net/NeckoChild.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/TextEvents.h"
 #include "mozilla/TouchEvents.h"
 #include "mozilla/unused.h"
 #include "nsCOMPtr.h"
@@ -2099,30 +2098,16 @@ TabParent::UseAsyncPanZoom()
           GetScrollingBehavior() == ASYNC_PAN_ZOOM);
 }
 
 nsEventStatus
 TabParent::MaybeForwardEventToRenderFrame(WidgetInputEvent& aEvent,
                                           ScrollableLayerGuid* aOutTargetGuid,
                                           uint64_t* aOutInputBlockId)
 {
-  if (aEvent.mClass == eWheelEventClass) {
-    // Wheel events must be sent to APZ directly from the widget. New APZ-
-    // aware events should follow suit and move there as well. However, we
-    // do need to inform the child process of the correct target and block
-    // id.
-    if (aOutTargetGuid) {
-      *aOutTargetGuid = InputAPZContext::GetTargetLayerGuid();
-    }
-    if (aOutInputBlockId) {
-      *aOutInputBlockId = InputAPZContext::GetInputBlockId();
-    }
-    return nsEventStatus_eIgnore;
-  }
-
   if (RenderFrameParent* rfp = GetRenderFrame()) {
     return rfp->NotifyInputEvent(aEvent, aOutTargetGuid, aOutInputBlockId);
   }
   return nsEventStatus_eIgnore;
 }
 
 bool
 TabParent::RecvBrowserFrameOpenWindow(PBrowserParent* aOpener,
--- a/gfx/layers/apz/src/InputQueue.cpp
+++ b/gfx/layers/apz/src/InputQueue.cpp
@@ -50,18 +50,18 @@ InputQueue::ReceiveInputEvent(const nsRe
       // TODO (bug 1098430): we will eventually need to have smarter handling for
       // non-touch events as well.
       return aTarget->HandleInputEvent(aEvent);
   }
 }
 
 bool
 InputQueue::MaybeHandleCurrentBlock(const nsRefPtr<AsyncPanZoomController>& aTarget,
-                                    CancelableBlockState *block,
-                                    const InputData& aEvent) {
+                                           CancelableBlockState *block,
+                                           const InputData& aEvent) {
   if (block == CurrentBlock() && block->IsReadyForHandling()) {
     INPQ_LOG("current block is ready with target %p preventdefault %d\n",
         aTarget.get(), block->IsDefaultPrevented());
     if (!aTarget || block->IsDefaultPrevented()) {
       return true;
     }
     aTarget->HandleInputEvent(aEvent);
     return true;
@@ -157,17 +157,17 @@ InputQueue::ReceiveScrollWheelInput(cons
   // null) should take priority. This is equivalent to just always using the
   // target (confirmed or not) from the block.
   nsRefPtr<AsyncPanZoomController> target = block->GetTargetApzc();
 
   if (!MaybeHandleCurrentBlock(target, block, aEvent)) {
     block->AddEvent(aEvent.AsScrollWheelInput());
   }
 
-  return nsEventStatus_eConsumeDoDefault;
+  return nsEventStatus_eIgnore;
 }
 
 void
 InputQueue::CancelAnimationsForNewBlock(CancelableBlockState* aBlock)
 {
   // We want to cancel animations here as soon as possible (i.e. without waiting for
   // content responses) because a finger has gone down and we don't want to keep moving
   // the content under the finger. However, to prevent "future" touchstart events from
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -182,17 +182,16 @@
 
 #include <d3d11.h>
 
 #if !defined(SM_CONVERTIBLESLATEMODE)
 #define SM_CONVERTIBLESLATEMODE 0x2003
 #endif
 
 #include "mozilla/layers/APZCTreeManager.h"
-#include "mozilla/layers/InputAPZContext.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 using namespace mozilla::layers;
 using namespace mozilla::widget;
 
 namespace mozilla {
@@ -3737,28 +3736,16 @@ bool nsWindow::DispatchKeyboardEvent(Wid
 {
   nsEventStatus status;
   DispatchEvent(event, status);
   return ConvertStatus(status);
 }
 
 bool nsWindow::DispatchScrollEvent(WidgetGUIEvent* aEvent)
 {
-  uint64_t inputBlockId = 0;
-  ScrollableLayerGuid guid;
-
-  if (mAPZC && aEvent->mClass == eWheelEventClass) {
-    nsEventStatus status = mAPZC->ReceiveInputEvent(*aEvent->AsWheelEvent(), &guid, &inputBlockId);
-    if (status == nsEventStatus_eConsumeNoDefault) {
-      return true;
-    }
-  }
-
-  InputAPZContext context(guid, inputBlockId);
-
   nsEventStatus status;
   DispatchEvent(aEvent, status);
   return ConvertStatus(status);
 }
 
 bool nsWindow::DispatchWindowEvent(WidgetGUIEvent* event)
 {
   nsEventStatus status;