Backed out 3 changesets (bug 822898) for mochitest bustage on B2G ICS emulator
authorOleg Romashin <oleg.romashin@microsoft.com>
Wed, 20 Nov 2013 16:08:36 -0800
changeset 157013 0752cf4780e0b726a238607d8c1135a1cf176875
parent 157012 d8dac30c9a287ba60c2effa72ff703c26dc2e246
child 157014 bdde67dc0f1b47794f3fe44cdf265876d7ed8aa7
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
bugs822898
milestone28.0a1
Backed out 3 changesets (bug 822898) for mochitest bustage on B2G ICS emulator
content/base/src/nsGkAtomList.h
content/events/public/nsEventNameList.h
content/events/src/PointerEvent.cpp
content/events/src/PointerEvent.h
content/events/src/moz.build
content/events/src/nsDOMEvent.cpp
content/events/src/nsDOMMouseEvent.cpp
content/events/src/nsDOMUIEvent.cpp
content/events/src/nsDOMUIEvent.h
content/events/src/nsEventDispatcher.cpp
content/events/test/mochitest.ini
content/events/test/test_all_synthetic_events.html
content/events/test/test_bug822898.html
content/events/test/test_eventctors.html
dom/interfaces/core/nsIInlineEventHandlers.idl
dom/interfaces/events/nsIDOMEvent.idl
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/EventHandler.webidl
dom/webidl/PointerEvent.webidl
dom/webidl/moz.build
layout/base/nsLayoutUtils.cpp
modules/libpref/src/init/all.js
widget/BasicEvents.h
widget/EventClassList.h
widget/MouseEvents.h
widget/nsGUIEventIPC.h
widget/shared/WidgetEventImpl.cpp
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -1753,28 +1753,16 @@ GK_ATOM(onMozRotateGestureStart, "onMozR
 GK_ATOM(onMozRotateGestureUpdate, "onMozRotateGestureUpdate")
 GK_ATOM(onMozRotateGesture, "onMozRotateGesture")
 GK_ATOM(onMozTapGesture, "onMozTapGesture")
 GK_ATOM(onMozPressTapGesture, "onMozPressTapGesture")
 GK_ATOM(onMozEdgeUIStarted, "onMozEdgeUIStarted")
 GK_ATOM(onMozEdgeUICanceled, "onMozEdgeUICanceled")
 GK_ATOM(onMozEdgeUICompleted, "onMozEdgeUICompleted")
 
-// Pointer events
-GK_ATOM(onpointerdown, "onpointerdown")
-GK_ATOM(onpointermove, "onpointermove")
-GK_ATOM(onpointerup, "onpointerup")
-GK_ATOM(onpointercancel, "onpointercancel")
-GK_ATOM(onpointerover, "onpointerover")
-GK_ATOM(onpointerout, "onpointerout")
-GK_ATOM(onpointerenter, "onpointerenter")
-GK_ATOM(onpointerleave, "onpointerleave")
-GK_ATOM(ongotpointercapture, "ongotpointercapture")
-GK_ATOM(onlostpointercapture, "onlostpointercapture")
-
 // orientation support
 GK_ATOM(ondevicemotion, "ondevicemotion")
 GK_ATOM(ondeviceorientation, "ondeviceorientation")
 GK_ATOM(ondeviceproximity, "ondeviceproximity")
 GK_ATOM(onmozorientationchange, "onmozorientationchange")
 GK_ATOM(onuserproximity, "onuserproximity")
 
 // light sensor support
--- a/content/events/public/nsEventNameList.h
+++ b/content/events/public/nsEventNameList.h
@@ -288,58 +288,16 @@ EVENT(mozfullscreenerror,
 EVENT(mozpointerlockchange,
       NS_POINTERLOCKCHANGE,
       EventNameType_HTML,
       NS_EVENT)
 EVENT(mozpointerlockerror,
       NS_POINTERLOCKERROR,
       EventNameType_HTML,
       NS_EVENT)
-
-EVENT(pointerdown,
-      NS_POINTER_DOWN,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(pointermove,
-      NS_POINTER_MOVE,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(pointerup,
-      NS_POINTER_UP,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(pointercancel,
-      NS_POINTER_CANCEL,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(pointerover,
-      NS_POINTER_OVER,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(pointerout,
-      NS_POINTER_OUT,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(pointerenter,
-      NS_POINTER_ENTER,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(pointerleave,
-      NS_POINTER_LEAVE,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(gotpointercapture,
-      NS_POINTER_GOT_CAPTURE,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-EVENT(lostpointercapture,
-      NS_POINTER_LOST_CAPTURE,
-      EventNameType_All,
-      NS_POINTER_EVENT)
-
 // Not supported yet; probably never because "wheel" is a better idea.
 // EVENT(mousewheel)
 EVENT(pause,
       NS_PAUSE,
       EventNameType_HTML,
       NS_EVENT)
 EVENT(play,
       NS_PLAY,
deleted file mode 100644
--- a/content/events/src/PointerEvent.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Portions Copyright 2013 Microsoft Open Technologies, Inc. */
-
-#include "PointerEvent.h"
-#include "mozilla/MouseEvents.h"
-#include "prtime.h"
-
-namespace mozilla {
-namespace dom {
-
-PointerEvent::PointerEvent(EventTarget* aOwner,
-                           nsPresContext* aPresContext,
-                           WidgetPointerEvent* aEvent)
-  : nsDOMMouseEvent(aOwner, aPresContext, aEvent ? aEvent : new WidgetPointerEvent(false, 0, nullptr))
-{
-  NS_ASSERTION(mEvent->eventStructType == NS_POINTER_EVENT, "event type mismatch NS_POINTER_EVENT");
-
-  WidgetMouseEvent* mouseEvent = mEvent->AsMouseEvent();
-  if (aEvent) {
-    mEventIsInternal = false;
-  } else {
-    mEventIsInternal = true;
-    mEvent->time = PR_Now();
-    mEvent->refPoint.x = mEvent->refPoint.y = 0;
-    mouseEvent->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
-  }
-}
-
-static uint16_t
-ConvertStringToPointerType(const nsAString& aPointerTypeArg)
-{
-  if (aPointerTypeArg.EqualsLiteral("mouse")) {
-    return nsIDOMMouseEvent::MOZ_SOURCE_MOUSE;
-  }
-  if (aPointerTypeArg.EqualsLiteral("pen")) {
-    return nsIDOMMouseEvent::MOZ_SOURCE_PEN;
-  }
-  if (aPointerTypeArg.EqualsLiteral("touch")) {
-    return nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
-  }
-
-  return nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
-}
-
-//static
-already_AddRefed<PointerEvent>
-PointerEvent::Constructor(const mozilla::dom::GlobalObject& aGlobal,
-                          const nsAString& aType,
-                          const mozilla::dom::PointerEventInit& aParam,
-                          mozilla::ErrorResult& aRv)
-{
-  nsCOMPtr<mozilla::dom::EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
-  nsRefPtr<PointerEvent> e = new PointerEvent(t, nullptr, nullptr);
-  bool trusted = e->Init(t);
-
-  aRv = e->InitMouseEvent(aType, aParam.mBubbles, aParam.mCancelable,
-                          aParam.mView, aParam.mDetail, aParam.mScreenX,
-                          aParam.mScreenY, aParam.mClientX, aParam.mClientY,
-                          aParam.mCtrlKey, aParam.mAltKey, aParam.mShiftKey,
-                          aParam.mMetaKey, aParam.mButton, aParam.mRelatedTarget);
-  if (aRv.Failed()) {
-    return nullptr;
-  }
-
-  WidgetPointerEvent* widgetEvent = e->mEvent->AsPointerEvent();
-  widgetEvent->pointerId = aParam.mPointerId;
-  widgetEvent->width = aParam.mWidth;
-  widgetEvent->height = aParam.mHeight;
-  widgetEvent->pressure = aParam.mPressure;
-  widgetEvent->tiltX = aParam.mTiltX;
-  widgetEvent->tiltY = aParam.mTiltY;
-  widgetEvent->inputSource = ConvertStringToPointerType(aParam.mPointerType);
-  widgetEvent->isPrimary = aParam.mIsPrimary;
-  widgetEvent->buttons = aParam.mButtons;
-
-  e->SetTrusted(trusted);
-  return e.forget();
-}
-
-void
-PointerEvent::GetPointerType(nsAString& aPointerType)
-{
-  switch (mEvent->AsPointerEvent()->inputSource) {
-    case nsIDOMMouseEvent::MOZ_SOURCE_MOUSE:
-      aPointerType.AssignLiteral("mouse");
-      break;
-    case nsIDOMMouseEvent::MOZ_SOURCE_PEN:
-      aPointerType.AssignLiteral("pen");
-      break;
-    case nsIDOMMouseEvent::MOZ_SOURCE_TOUCH:
-      aPointerType.AssignLiteral("touch");
-      break;
-    case nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN:
-      aPointerType.AssignLiteral("");
-      break;
-  }
-}
-
-int32_t PointerEvent::PointerId()
-{
-  return mEvent->AsPointerEvent()->pointerId;
-}
-
-int32_t PointerEvent::Width()
-{
-  return mEvent->AsPointerEvent()->width;
-}
-
-int32_t PointerEvent::Height()
-{
-  return mEvent->AsPointerEvent()->height;
-}
-
-int32_t PointerEvent::Pressure()
-{
-  return mEvent->AsPointerEvent()->pressure;
-}
-
-int32_t PointerEvent::TiltX()
-{
-  return mEvent->AsPointerEvent()->tiltX;
-}
-
-int32_t PointerEvent::TiltY()
-{
-  return mEvent->AsPointerEvent()->tiltY;
-}
-
-bool PointerEvent::IsPrimary()
-{
-  return mEvent->AsPointerEvent()->isPrimary;
-}
-
-} // namespace dom
-} // namespace mozilla
-
-using namespace mozilla;
-
-nsresult NS_NewDOMPointerEvent(nsIDOMEvent** aInstancePtrResult,
-                               dom::EventTarget* aOwner,
-                               nsPresContext* aPresContext,
-                               WidgetPointerEvent *aEvent)
-{
-  dom::PointerEvent *it = new dom::PointerEvent(aOwner, aPresContext, aEvent);
-  return CallQueryInterface(it, aInstancePtrResult);
-}
deleted file mode 100644
--- a/content/events/src/PointerEvent.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Portions Copyright 2013 Microsoft Open Technologies, Inc. */
-
-#ifndef PointerEvent_h__
-#define PointerEvent_h__
-
-#include "nsDOMMouseEvent.h"
-#include "mozilla/dom/PointerEventBinding.h"
-
-class nsPresContext;
-
-namespace mozilla {
-namespace dom {
-
-class PointerEvent : public nsDOMMouseEvent
-{
-public:
-  PointerEvent(EventTarget* aOwner,
-               nsPresContext* aPresContext,
-               WidgetPointerEvent* aEvent);
-
-  virtual JSObject* WrapObject(JSContext* aCx,
-                               JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
-  {
-    return mozilla::dom::PointerEventBinding::Wrap(aCx, aScope, this);
-  }
-
-  static already_AddRefed<PointerEvent>
-  Constructor(const GlobalObject& aGlobal,
-              const nsAString& aType,
-              const PointerEventInit& aParam,
-              mozilla::ErrorResult& aRv);
-
-  int32_t PointerId();
-  int32_t Width();
-  int32_t Height();
-  int32_t Pressure();
-  int32_t TiltX();
-  int32_t TiltY();
-  bool IsPrimary();
-  void GetPointerType(nsAString& aPointerType);
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif
--- a/content/events/src/moz.build
+++ b/content/events/src/moz.build
@@ -9,17 +9,16 @@ EXPORTS += [
     'nsDOMEventTargetHelper.h',
     'nsDOMTouchEvent.h',
     'nsDOMUIEvent.h',
     'nsEventListenerManager.h',
     'nsEventStateManager.h',
 ]
 
 EXPORTS.mozilla.dom += [
-    'PointerEvent.h',
     'Touch.h',
 ]
 
 if CONFIG['MOZ_WEBSPEECH']:
     EXPORTS.mozilla.dom += ['SpeechRecognitionError.h']
 
 UNIFIED_SOURCES += [
     'DOMWheelEvent.cpp',
@@ -53,17 +52,16 @@ UNIFIED_SOURCES += [
     'nsDOMUIEvent.cpp',
     'nsDOMXULCommandEvent.cpp',
     'nsEventDispatcher.cpp',
     'nsEventListenerManager.cpp',
     'nsEventListenerService.cpp',
     'nsIMEStateManager.cpp',
     'nsPaintRequest.cpp',
     'nsPrivateTextRange.cpp',
-    'PointerEvent.cpp',
     'TextComposition.cpp',
     'Touch.cpp',
 ]
 
 # nsEventStateManager.cpp should be built separately because of Mac OS X headers.
 SOURCES += [
     'nsEventStateManager.cpp',
 ]
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -140,17 +140,16 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ns
     tmp->mEvent->target = nullptr;
     tmp->mEvent->currentTarget = nullptr;
     tmp->mEvent->originalTarget = nullptr;
     switch (tmp->mEvent->eventStructType) {
       case NS_MOUSE_EVENT:
       case NS_MOUSE_SCROLL_EVENT:
       case NS_WHEEL_EVENT:
       case NS_SIMPLE_GESTURE_EVENT:
-      case NS_POINTER_EVENT:
         tmp->mEvent->AsMouseEventBase()->relatedTarget = nullptr;
         break;
       case NS_DRAG_EVENT: {
         WidgetDragEvent* dragEvent = tmp->mEvent->AsDragEvent();
         dragEvent->dataTransfer = nullptr;
         dragEvent->relatedTarget = nullptr;
         break;
       }
@@ -178,17 +177,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->target)
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->currentTarget)
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->originalTarget)
     switch (tmp->mEvent->eventStructType) {
       case NS_MOUSE_EVENT:
       case NS_MOUSE_SCROLL_EVENT:
       case NS_WHEEL_EVENT:
       case NS_SIMPLE_GESTURE_EVENT:
-      case NS_POINTER_EVENT:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->relatedTarget");
         cb.NoteXPCOMChild(tmp->mEvent->AsMouseEventBase()->relatedTarget);
         break;
       case NS_DRAG_EVENT: {
         WidgetDragEvent* dragEvent = tmp->mEvent->AsDragEvent();
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->dataTransfer");
         cb.NoteXPCOMChild(dragEvent->dataTransfer);
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->relatedTarget");
@@ -735,31 +733,16 @@ nsDOMEvent::DuplicatePrivateData()
     case NS_TOUCH_EVENT:
     {
       WidgetTouchEvent* oldTouchEvent = mEvent->AsTouchEvent();
       WidgetTouchEvent* touchEvent = new WidgetTouchEvent(false, oldTouchEvent);
       touchEvent->AssignTouchEventData(*oldTouchEvent, true);
       newEvent = touchEvent;
       break;
     }
-    case NS_POINTER_EVENT:
-    {
-      WidgetPointerEvent* oldPointerEvent = mEvent->AsPointerEvent();
-      WidgetPointerEvent* pointerEvent =
-        new WidgetPointerEvent(false, msg, nullptr,
-                               oldPointerEvent->pointerId,
-                               oldPointerEvent->width,
-                               oldPointerEvent->height,
-                               oldPointerEvent->tiltX,
-                               oldPointerEvent->tiltY,
-                               oldPointerEvent->isPrimary);
-      pointerEvent->buttons = oldPointerEvent->buttons;
-      newEvent = pointerEvent;
-      break;
-    }
     default:
     {
       NS_WARNING("Unknown event type!!!");
       return NS_ERROR_FAILURE;
     }
   }
 
   newEvent->mFlags = mEvent->mFlags;
@@ -1034,17 +1017,16 @@ nsDOMEvent::GetScreenCoords(nsPresContex
   if (nsEventStateManager::sIsPointerLocked) {
     return nsEventStateManager::sLastScreenPoint;
   }
 
   if (!aEvent || 
        (aEvent->eventStructType != NS_MOUSE_EVENT &&
         aEvent->eventStructType != NS_MOUSE_SCROLL_EVENT &&
         aEvent->eventStructType != NS_WHEEL_EVENT &&
-        aEvent->eventStructType != NS_POINTER_EVENT &&
         aEvent->eventStructType != NS_TOUCH_EVENT &&
         aEvent->eventStructType != NS_DRAG_EVENT &&
         aEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT)) {
     return nsIntPoint(0, 0);
   }
 
   WidgetGUIEvent* guiEvent = aEvent->AsGUIEvent();
   if (!guiEvent->widget) {
@@ -1094,17 +1076,16 @@ nsDOMEvent::GetClientCoords(nsPresContex
   }
 
   if (!aEvent ||
       (aEvent->eventStructType != NS_MOUSE_EVENT &&
        aEvent->eventStructType != NS_MOUSE_SCROLL_EVENT &&
        aEvent->eventStructType != NS_WHEEL_EVENT &&
        aEvent->eventStructType != NS_TOUCH_EVENT &&
        aEvent->eventStructType != NS_DRAG_EVENT &&
-       aEvent->eventStructType != NS_POINTER_EVENT &&
        aEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT) ||
       !aPresContext ||
       !aEvent->AsGUIEvent()->widget) {
     return aDefaultPoint;
   }
 
   nsIPresShell* shell = aPresContext->GetPresShell();
   if (!shell) {
--- a/content/events/src/nsDOMMouseEvent.cpp
+++ b/content/events/src/nsDOMMouseEvent.cpp
@@ -57,17 +57,16 @@ nsDOMMouseEvent::InitMouseEvent(const ns
   nsresult rv = nsDOMUIEvent::InitUIEvent(aType, aCanBubble, aCancelable, aView, aDetail);
   NS_ENSURE_SUCCESS(rv, rv);
 
   switch(mEvent->eventStructType) {
     case NS_MOUSE_EVENT:
     case NS_MOUSE_SCROLL_EVENT:
     case NS_WHEEL_EVENT:
     case NS_DRAG_EVENT:
-    case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT: {
       WidgetMouseEventBase* mouseEventBase = mEvent->AsMouseEventBase();
       mouseEventBase->relatedTarget = aRelatedTarget;
       mouseEventBase->button = aButton;
       mouseEventBase->InitBasicModifiers(aCtrlKey, aAltKey, aShiftKey, aMetaKey);
       mClientPoint.x = aClientX;
       mClientPoint.y = aClientY;
       mouseEventBase->refPoint.x = aScreenX;
@@ -111,17 +110,16 @@ nsDOMMouseEvent::InitMouseEvent(const ns
                                aButton, aRelatedTarget);
   NS_ENSURE_SUCCESS(rv, rv);
 
   switch(mEvent->eventStructType) {
     case NS_MOUSE_EVENT:
     case NS_MOUSE_SCROLL_EVENT:
     case NS_WHEEL_EVENT:
     case NS_DRAG_EVENT:
-    case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       mEvent->AsInputEvent()->modifiers = modifiers;
       return NS_OK;
     default:
       MOZ_CRASH("There is no space to store the modifiers");
   }
 }
 
@@ -142,17 +140,16 @@ nsDOMMouseEvent::Constructor(const mozil
                     aRv);
   e->SetTrusted(trusted);
 
   switch (e->mEvent->eventStructType) {
     case NS_MOUSE_EVENT:
     case NS_MOUSE_SCROLL_EVENT:
     case NS_WHEEL_EVENT:
     case NS_DRAG_EVENT:
-    case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       e->mEvent->AsMouseEventBase()->buttons = aParam.mButtons;
       break;
     default:
       break;
   }
 
   return e.forget();
@@ -190,17 +187,16 @@ uint16_t
 nsDOMMouseEvent::Button()
 {
   switch(mEvent->eventStructType)
   {
     case NS_MOUSE_EVENT:
     case NS_MOUSE_SCROLL_EVENT:
     case NS_WHEEL_EVENT:
     case NS_DRAG_EVENT:
-    case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       return mEvent->AsMouseEventBase()->button;
     default:
       NS_WARNING("Tried to get mouse button for non-mouse event!");
       return WidgetMouseEvent::eLeftButton;
   }
 }
 
@@ -216,17 +212,16 @@ uint16_t
 nsDOMMouseEvent::Buttons()
 {
   switch(mEvent->eventStructType)
   {
     case NS_MOUSE_EVENT:
     case NS_MOUSE_SCROLL_EVENT:
     case NS_WHEEL_EVENT:
     case NS_DRAG_EVENT:
-    case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       return mEvent->AsMouseEventBase()->buttons;
     default:
       MOZ_CRASH("Tried to get mouse buttons for non-mouse event!");
   }
 }
 
 NS_IMETHODIMP
@@ -242,17 +237,16 @@ nsDOMMouseEvent::GetRelatedTarget()
 {
   nsCOMPtr<mozilla::dom::EventTarget> relatedTarget;
   switch(mEvent->eventStructType)
   {
     case NS_MOUSE_EVENT:
     case NS_MOUSE_SCROLL_EVENT:
     case NS_WHEEL_EVENT:
     case NS_DRAG_EVENT:
-    case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       relatedTarget =
         do_QueryInterface(mEvent->AsMouseEventBase()->relatedTarget);
       break;
     default:
       break;
   }
 
--- a/content/events/src/nsDOMUIEvent.cpp
+++ b/content/events/src/nsDOMUIEvent.cpp
@@ -114,17 +114,16 @@ nsDOMUIEvent::GetMovementPoint()
     return mMovementPoint;
   }
 
   if (!mEvent ||
       (mEvent->eventStructType != NS_MOUSE_EVENT &&
        mEvent->eventStructType != NS_MOUSE_SCROLL_EVENT &&
        mEvent->eventStructType != NS_WHEEL_EVENT &&
        mEvent->eventStructType != NS_DRAG_EVENT &&
-       mEvent->eventStructType != NS_POINTER_EVENT &&
        mEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT) ||
        !mEvent->AsGUIEvent()->widget) {
     return nsIntPoint(0, 0);
   }
 
   // Calculate the delta between the last screen point and the current one.
   nsIntPoint current = DevPixelsToCSSPixels(mEvent->refPoint, mPresContext);
   nsIntPoint last = DevPixelsToCSSPixels(mEvent->lastRefPoint, mPresContext);
@@ -296,17 +295,16 @@ nsDOMUIEvent::SetCancelBubble(bool aCanc
 
 nsIntPoint
 nsDOMUIEvent::GetLayerPoint() const
 {
   if (!mEvent ||
       (mEvent->eventStructType != NS_MOUSE_EVENT &&
        mEvent->eventStructType != NS_MOUSE_SCROLL_EVENT &&
        mEvent->eventStructType != NS_WHEEL_EVENT &&
-       mEvent->eventStructType != NS_POINTER_EVENT &&
        mEvent->eventStructType != NS_TOUCH_EVENT &&
        mEvent->eventStructType != NS_DRAG_EVENT &&
        mEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT) ||
       !mPresContext ||
       mEventIsInternal) {
     return mLayerPoint;
   }
   // XXX I'm not really sure this is correct; it's my best shot, though
--- a/content/events/src/nsDOMUIEvent.h
+++ b/content/events/src/nsDOMUIEvent.h
@@ -41,17 +41,16 @@ public:
   CalculateScreenPoint(nsPresContext* aPresContext,
                        mozilla::WidgetEvent* aEvent)
   {
     if (!aEvent ||
         (aEvent->eventStructType != NS_MOUSE_EVENT &&
          aEvent->eventStructType != NS_MOUSE_SCROLL_EVENT &&
          aEvent->eventStructType != NS_WHEEL_EVENT &&
          aEvent->eventStructType != NS_DRAG_EVENT &&
-         aEvent->eventStructType != NS_POINTER_EVENT &&
          aEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT)) {
       return nsIntPoint(0, 0);
     }
 
     mozilla::WidgetGUIEvent* event = aEvent->AsGUIEvent();
     if (!event->widget) {
       return mozilla::LayoutDeviceIntPoint::ToUntyped(aEvent->refPoint);
     }
@@ -67,17 +66,16 @@ public:
                                           mozilla::WidgetEvent* aEvent,
                                           CSSIntPoint* aDefaultClientPoint)
   {
     if (!aEvent ||
         (aEvent->eventStructType != NS_MOUSE_EVENT &&
          aEvent->eventStructType != NS_MOUSE_SCROLL_EVENT &&
          aEvent->eventStructType != NS_WHEEL_EVENT &&
          aEvent->eventStructType != NS_DRAG_EVENT &&
-         aEvent->eventStructType != NS_POINTER_EVENT &&
          aEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT) ||
         !aPresContext ||
         !aEvent->AsGUIEvent()->widget) {
       return aDefaultClientPoint
              ? *aDefaultClientPoint
              : CSSIntPoint(0, 0);
     }
 
--- a/content/events/src/nsEventDispatcher.cpp
+++ b/content/events/src/nsEventDispatcher.cpp
@@ -734,19 +734,16 @@ nsEventDispatcher::CreateEvent(mozilla::
       return NS_NewDOMTimeEvent(aDOMEvent, aOwner, aPresContext, aEvent);
 
     case NS_COMMAND_EVENT:
       return NS_NewDOMCommandEvent(aDOMEvent, aOwner, aPresContext,
                                    aEvent->AsCommandEvent());
     case NS_SIMPLE_GESTURE_EVENT:
       return NS_NewDOMSimpleGestureEvent(aDOMEvent, aOwner, aPresContext,
                                          aEvent->AsSimpleGestureEvent());
-    case NS_POINTER_EVENT:
-      return NS_NewDOMPointerEvent(aDOMEvent, aOwner, aPresContext,
-                                   aEvent->AsPointerEvent());
     case NS_TOUCH_EVENT:
       return NS_NewDOMTouchEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsTouchEvent());
     case NS_TRANSITION_EVENT:
       return NS_NewDOMTransitionEvent(aDOMEvent, aOwner, aPresContext,
                                       aEvent->AsTransitionEvent());
     case NS_ANIMATION_EVENT:
       return NS_NewDOMAnimationEvent(aDOMEvent, aOwner, aPresContext,
--- a/content/events/test/mochitest.ini
+++ b/content/events/test/mochitest.ini
@@ -40,17 +40,16 @@ support-files =
 [test_bug448602.html]
 [test_bug450876.html]
 [test_bug456273.html]
 [test_bug457672.html]
 [test_bug489671.html]
 [test_bug493251.html]
 [test_bug502818.html]
 [test_bug508479.html]
-[test_bug822898.html]
 [test_bug517851.html]
 [test_bug534833.html]
 [test_bug545268.html]
 [test_bug547996-1.html]
 [test_bug547996-2.xhtml]
 [test_bug556493.html]
 [test_bug574663.html]
 [test_bug591815.html]
--- a/content/events/test/test_all_synthetic_events.html
+++ b/content/events/test/test_all_synthetic_events.html
@@ -289,20 +289,16 @@ const kEventConstructors = {
                                                        },
                                              },
   OfflineAudioCompletionEvent:               { create: null, // Cannot create untrusted event from JS.
                                              },
   PageTransitionEvent:                       { create: function (aName, aProps) {
                                                          return new PageTransitionEvent(aName, aProps);
                                                        },
                                              },
-  PointerEvent:                              { create: function (aName, aProps) {
-                                                         return new PointerEvent(aName, aProps);
-                                                       },
-                                             },
   PopStateEvent:                             { create: function (aName, aProps) {
                                                          return new PopStateEvent(aName, aProps);
                                                        },
                                              },
   PopupBlockedEvent:                         { create: function (aName, aProps) {
                                                          return new PopupBlockedEvent(aName, aProps);
                                                        },
                                              },
deleted file mode 100644
--- a/content/events/test/test_bug822898.html
+++ /dev/null
@@ -1,267 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=822898
--->
-<head>
-  <title>Test for Bug 822898</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=822898">Mozilla Bug 822898</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  <iframe id="subFrame"></iframe>
-</div>
-<pre id="test">
-<script class="testbody" type="application/javascript;version=1.8">
-
-/** Test for Bug 822898 - Pointer* Events **/
-
-let tests = [], testTarget, parent, gOnPointerPropHandled;
-
-function nextTest() {
-  if (tests.length)
-    SimpleTest.executeSoon(tests.shift());
-}
-
-function random() {
-  return Math.floor(Math.random() * 100);
-}
-
-function createTestEventValue(name) {
-
-  let detail = random();
-  let screenX = random();
-  let screenY = random();
-  let clientX = random();
-  let clientY = random();
-  let ctrlKey = random() % 2 ? true : false;
-  let altKey = random() % 2 ? true : false;
-  let shiftKey = random() % 2 ? true : false;
-  let metaKey = random() % 2 ? true : false;
-  let button = random();
-  let pointerId = random();
-
-  return function() {
-    let event = new PointerEvent("pointerdown", {
-      bubbles: true, cancelable: true, view: window,
-      detail: detail, screenX: screenX, screenY: screenY, clientX: clientX, clientY: clientY,
-      ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey, metaKey: metaKey,
-      button: button, relatedTarget: null, pointerId: pointerId
-    });
-
-
-    function check(ev) {
-      is(ev.detail, detail, "Correct detail");
-      is(ev.screenX, screenX, "Correct screenX");
-      is(ev.screenY, screenY, "Correct screenY");
-      is(ev.clientX, clientX, "Correct clientX");
-      is(ev.clientY, clientY, "Correct clientY");
-      is(ev.ctrlKey, ctrlKey, "Correct ctrlKey");
-      is(ev.altKey, altKey, "Correct altKey");
-      is(ev.shiftKey, shiftKey, "Correct shiftKey");
-      is(ev.metaKey, metaKey, "Correct metaKey");
-      is(ev.button, button, "Correct buttonArg");
-      is(ev.pointerId, pointerId, "Correct pointerId");
-    }
-
-    for each (let target in [document, window, testTarget, parent])
-      target.addEventListener(name, check, false);
-
-    testTarget.dispatchEvent(event);
-
-    for each (let target in [document, window, testTarget, parent])
-      target.removeEventListener(name, check, false);
-
-
-    nextTest();
-  }
-}
-
-function getDefaultArgEvent(eventname) {
-  return new PointerEvent(eventname, {
-    bubbles: true, cancelable: true, view: window,
-    detail: 0, screenX: 0, screenY: 0, clientX: 0, clientY: 0,
-    ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
-    button: 0, relatedTarget: null, pointerId: 0
-  });
-}
-
-function testDefaultArg() {
-  let event = getDefaultArgEvent("pointerdown");
-
-  testTarget.addEventListener("pointerdown", function(ev) {
-    testTarget.removeEventListener("pointerdown", arguments.callee, false);
-    is(ev.pointerId, 0, "Correct default pointerId");
-  }, false);
-  testTarget.dispatchEvent(event);
-
-  nextTest();
-}
-
-function testStopPropagation() {
-  let event = getDefaultArgEvent("pointerdown");
-
-  let unreachableListener = function () {
-    ok(false, "Event should have been stopped");
-  }
-
-  // Capturing phase
-  let captured = false;
-  parent.addEventListener("pointerdown", function() {
-    parent.removeEventListener("pointerdown", arguments.callee, true);
-    captured = true;
-  }, true); // Capturing phase
-
-  // Bubbling phase
-  parent.addEventListener("pointerdown", unreachableListener, false);
-
-  testTarget.addEventListener("pointerdown", function(ev) {
-    testTarget.removeEventListener("pointerdown", arguments.callee, false);
-    is(captured, true, "Event should have been captured");
-    ev.stopPropagation();
-  }, false);
-
-  testTarget.dispatchEvent(event);
-
-  parent.removeEventListener("pointerdown", unreachableListener, false);
-
-  nextTest();
-}
-
-function testPreventDefault() {
-  let event = getDefaultArgEvent("pointerdown");
-
-  parent.addEventListener("pointerdown", function(ev) {
-    parent.removeEventListener("pointerdown", arguments.callee, false);
-    is(ev.defaultPrevented, true, "preventDefault can be called");
-    nextTest();
-  }, false);
-
-  testTarget.addEventListener("pointerdown", function(ev) {
-    testTarget.removeEventListener("pointerdown", arguments.callee, false);
-    ev.preventDefault();
-  }, false);
-
-  testTarget.dispatchEvent(event);
-}
-
-function testBlockPreventDefault() {
-  let event = new PointerEvent("pointerdown", {
-    bubbles: true, cancelable: false, view: window,
-    detail: 0, screenX: 0, screenY: 0, clientX: 0, clientY: 0,
-    ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
-    button: 0, relatedTarget: null, pointerId: 0, pointerType: "pen"
-  });
-
-  parent.addEventListener("pointerdown", function(ev) {
-    parent.removeEventListener("pointerdown", arguments.callee, false);
-    is(ev.defaultPrevented, false, "aCancelableArg works");
-    nextTest();
-  }, false);
-
-  testTarget.addEventListener("pointerdown", function(ev) {
-    testTarget.removeEventListener("pointerdown", arguments.callee, false);
-    ev.preventDefault();
-  }, false);
-
-  testTarget.dispatchEvent(event);
-}
-
-function testBlockBubbling() {
-  let unreachableListener = function () {
-    ok(false, "aCanBubble doesn't work");
-  }
-
-  let event = new PointerEvent("pointerdown", {
-    bubbles: false, cancelable: true, view: window,
-    detail: 0, screenX: 0, screenY: 0, clientX: 0, clientY: 0,
-    ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
-    button: 0, relatedTarget: null, pointerId: 0
-  });
-
-  parent.addEventListener("pointerdown", unreachableListener, false);
-  testTarget.dispatchEvent(event);
-  parent.removeEventListener("pointerdown", unreachableListener, false);
-
-  nextTest();
-}
-
-function testOnPointerProperty()
-{
-  var ifrwindow = document.getElementById("subFrame").contentWindow;
-  var iframeBody = ifrwindow.document.body;
-  var utils = SpecialPowers.getDOMWindowUtils(ifrwindow);
-
-  iframeBody.onpointerdown = function (e) { gOnPointerPropHandled["pointerdown"] = true; }
-  iframeBody.onpointerup = function (e) { gOnPointerPropHandled["pointerup"] = true; }
-  iframeBody.onpointermove = function (e) { gOnPointerPropHandled["pointermove"] = true; }
-  iframeBody.onpointerout = function (e) { gOnPointerPropHandled["pointerout"] = true; }
-  iframeBody.onpointerover = function (e) { gOnPointerPropHandled["pointerover"] = true; }
-  iframeBody.onpointerenter = function (e) { gOnPointerPropHandled["pointerenter"] = true; }
-  iframeBody.onpointerleave = function (e) { gOnPointerPropHandled["pointerleave"] = true; }
-
-  iframeBody.dispatchEvent(getDefaultArgEvent("pointerdown"));
-  is(gOnPointerPropHandled['pointerdown'], true, "pointerdown property is performed");
-
-  iframeBody.dispatchEvent(getDefaultArgEvent("pointerup"));
-  is(gOnPointerPropHandled['pointerup'], true, "pointerup property is performed");
-
-  iframeBody.dispatchEvent(getDefaultArgEvent("pointermove"));
-  is(gOnPointerPropHandled['pointermove'], true, "pointermove property is performed");
-
-  iframeBody.dispatchEvent(getDefaultArgEvent("pointerout"));
-  is(gOnPointerPropHandled['pointerout'], true, "pointerout property is performed");
-
-  iframeBody.dispatchEvent(getDefaultArgEvent("pointerover"));
-  is(gOnPointerPropHandled['pointerover'], true, "pointerover property is performed");
-
-  iframeBody.dispatchEvent(getDefaultArgEvent("pointerenter"));
-  is(gOnPointerPropHandled['pointerenter'], true, "pointerenter property is performed");
-
-  iframeBody.dispatchEvent(getDefaultArgEvent("pointerleave"));
-  is(gOnPointerPropHandled['pointerleave'], true, "pointerleave property is performed");
-
-  nextTest();
-}
-
-
-function runTests() {
-  SpecialPowers.setBoolPref("dom.w3c_pointer_events.enabled", true);      // Enable Pointer Events
-  testTarget = document.getElementById("testTarget");
-  parent = testTarget.parentNode;
-  gOnPointerPropHandled = new Array;
-
-  tests.push(createTestEventValue("pointerdown"));
-  tests.push(createTestEventValue("pointermove"));
-  tests.push(createTestEventValue("pointerup"));
-
-  tests.push(testDefaultArg);
-  tests.push(testStopPropagation);
-
-  tests.push(testPreventDefault);
-  tests.push(testBlockPreventDefault);
-
-  tests.push(testBlockBubbling);
-  tests.push(testOnPointerProperty());
-
-  tests.push(function() {
-    SpecialPowers.clearUserPref("dom.w3c_pointer_events.enabled");      // Disable Pointer Events
-    SimpleTest.finish();
-  });
-
-  nextTest();
-}
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(runTests, window);
-
-</script>
-</pre>
-<div id="parent">
-  <span id="testTarget" style="border: 1px solid black;">testTarget</span>
-</div>
-</body>
-</html>
--- a/content/events/test/test_eventctors.html
+++ b/content/events/test/test_eventctors.html
@@ -719,88 +719,12 @@ while (testWheelProps.length) {
       is(e[def], defaultWheelEventValues[def],
          "WheelEvent: Wrong default value for " + def + "!");
     } else {
       is(e[def], p[def], "WheelEvent: Wrong event init value for " + def + "!");
     }
   }
 }
 
-// PointerEvent
-
-SpecialPowers.setBoolPref("dom.w3c_pointer_events.enabled", true);      // Enable Pointer Events
-
-try {
-  e = new PointerEvent();
-} catch(exp) {
-  ex = true;
-}
-ok(ex, "PointerEvent: First parameter is required!");
-ex = false;
-
-e = new PointerEvent("hello");
-ok(e.type, "hello", "PointerEvent: Wrong event type!");
-ok(!e.isTrusted, "PointerEvent: Event shouldn't be trusted!");
-ok(!e.bubbles, "PointerEvent: Event shouldn't bubble!");
-ok(!e.cancelable, "PointerEvent: Event shouldn't be cancelable!");
-document.dispatchEvent(e);
-is(receivedEvent, e, "PointerEvent: Wrong event!");
-
-var PointerEventProps =
-[ { screenX: 0 },
-  { screenY: 0 },
-  { clientX: 0 },
-  { clientY: 0 },
-  { ctrlKey: false },
-  { shiftKey: false },
-  { altKey: false },
-  { metaKey: false },
-  { button: 0 },
-  { buttons: 0 },
-  { relatedTarget: null },
-  { pointerId: 0 },
-  { pointerType: "" }
-];
-
-var testPointerProps =
-[
-  { screenX: 1 },
-  { screenY: 2 },
-  { clientX: 3 },
-  { clientY: 4 },
-  { ctrlKey: true },
-  { shiftKey: true },
-  { altKey: true },
-  { metaKey: true },
-  { button: 5 },
-  { buttons: 6 },
-  { relatedTarget: window },
-  { pointerId: 5 },
-  { pointerType: "mouse" }
-];
-
-var defaultPointerEventValues = {};
-for (var i = 0; i < PointerEventProps.length; ++i) {
-  for (prop in PointerEventProps[i]) {
-    ok(prop in e, "PointerEvent: PointerEvent doesn't have property " + prop + "!");
-    defaultPointerEventValues[prop] = PointerEventProps[i][prop];
-  }
-}
-
-while (testPointerProps.length) {
-  var p = testPointerProps.shift();
-  e = new PointerEvent("foo", p);
-  for (var def in defaultPointerEventValues) {
-    if (!(def in p)) {
-      is(e[def], defaultPointerEventValues[def],
-         "PointerEvent: Wrong default value for " + def + "!");
-    } else {
-      is(e[def], p[def], "PointerEvent: Wrong event init value for " + def + "!");
-    }
-  }
-}
-
-SpecialPowers.clearUserPref("dom.w3c_pointer_events.enabled");      // Disable Pointer Events
-
 </script>
 </pre>
 </body>
 </html>
--- a/dom/interfaces/core/nsIInlineEventHandlers.idl
+++ b/dom/interfaces/core/nsIInlineEventHandlers.idl
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "domstubs.idl"
 
 %{ C++
 #include "jspubtd.h"
 %}
 
-[scriptable, uuid(6c1fcf3d-119b-4cf4-9437-b9357508976a)]
+[scriptable, uuid(22df6ed6-d094-4e45-97fc-a8eca11c390c)]
 interface nsIInlineEventHandlers : nsISupports
 {
   [implicit_jscontext] attribute jsval onabort;
   [implicit_jscontext] attribute jsval onblur;
   [implicit_jscontext] attribute jsval oncanplay;
   [implicit_jscontext] attribute jsval oncanplaythrough;
   [implicit_jscontext] attribute jsval onchange;
   [implicit_jscontext] attribute jsval onclick;
@@ -66,27 +66,16 @@ interface nsIInlineEventHandlers : nsISu
   [implicit_jscontext] attribute jsval onstalled;
   [implicit_jscontext] attribute jsval onsubmit;
   [implicit_jscontext] attribute jsval onsuspend;
   [implicit_jscontext] attribute jsval ontimeupdate;
   [implicit_jscontext] attribute jsval onvolumechange;
   [implicit_jscontext] attribute jsval onwaiting;
   [implicit_jscontext] attribute jsval onwheel;
 
-  [implicit_jscontext] attribute jsval onpointerdown;
-  [implicit_jscontext] attribute jsval onpointermove;
-  [implicit_jscontext] attribute jsval onpointerout;
-  [implicit_jscontext] attribute jsval onpointerover;
-  [implicit_jscontext] attribute jsval onpointerup;
-  [implicit_jscontext] attribute jsval onpointerenter;
-  [implicit_jscontext] attribute jsval onpointerleave;
-  [implicit_jscontext] attribute jsval ongotpointercapture;
-  [implicit_jscontext] attribute jsval onlostpointercapture;
-  [implicit_jscontext] attribute jsval onpointercancel;
-
   /**
    * Non-HTML5 event attributes
    */
   [implicit_jscontext] attribute jsval oncopy;
   [implicit_jscontext] attribute jsval oncut;
   [implicit_jscontext] attribute jsval onpaste;
   [implicit_jscontext] attribute jsval onbeforescriptexecute;
   [implicit_jscontext] attribute jsval onafterscriptexecute;  
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ b/dom/interfaces/events/nsIDOMEvent.idl
@@ -367,21 +367,16 @@ NS_NewDOMTransitionEvent(nsIDOMEvent** a
                          nsPresContext* aPresContext,
                          mozilla::InternalTransitionEvent* aEvent);
 nsresult
 NS_NewDOMAnimationEvent(nsIDOMEvent** aInstancePtrResult,
                         mozilla::dom::EventTarget* aOwner,
                         nsPresContext* aPresContext,
                         mozilla::InternalAnimationEvent* aEvent);
 nsresult
-NS_NewDOMPointerEvent(nsIDOMEvent** aInstancePtrResult,
-                      mozilla::dom::EventTarget* aOwner,
-                      nsPresContext* aPresContext,
-                      mozilla::WidgetPointerEvent* aEvent);
-nsresult
 NS_NewDOMTouchEvent(nsIDOMEvent** aInstancePtrResult,
                     mozilla::dom::EventTarget* aOwner,
                     nsPresContext* aPresContext,
                     mozilla::WidgetTouchEvent* aEvent);
 nsresult
 NS_NewDOMMozSettingsEvent(nsIDOMEvent** aInstancePtrResult,
                           mozilla::dom::EventTarget* aOwner,
                           nsPresContext* aPresContext,
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -398,17 +398,16 @@ var interfaceNamesInGlobalScope =
     "PannerNode",
     "Performance",
     "PerformanceNavigation",
     "PerformanceTiming",
     "PeriodicWave",
     "PhoneNumberService",
     "Plugin",
     "PluginArray",
-    {name: "PointerEvent", pref: "dom.w3c_pointer_events.enabled"},
     "PopStateEvent",
     "PopupBlockedEvent",
     "ProcessingInstruction",
     "ProgressEvent",
     {name: "Promise", b2g: false, release: false},
     "PropertyNodeList",
     "Range",
     "RecordErrorEvent",
--- a/dom/webidl/EventHandler.webidl
+++ b/dom/webidl/EventHandler.webidl
@@ -83,32 +83,16 @@ interface GlobalEventHandlers {
            //(Not implemented)attribute EventHandler onsort;
            attribute EventHandler onstalled;
            attribute EventHandler onsubmit;
            attribute EventHandler onsuspend;
            attribute EventHandler ontimeupdate;
            attribute EventHandler onvolumechange;
            attribute EventHandler onwaiting;
 
-           // Pointer events handlers
-           [Pref="dom.w3c_pointer_events.enabled"]
-           attribute EventHandler onpointerdown;
-           [Pref="dom.w3c_pointer_events.enabled"]
-           attribute EventHandler onpointerup;
-           [Pref="dom.w3c_pointer_events.enabled"]
-           attribute EventHandler onpointermove;
-           [Pref="dom.w3c_pointer_events.enabled"]
-           attribute EventHandler onpointerout;
-           [Pref="dom.w3c_pointer_events.enabled"]
-           attribute EventHandler onpointerover;
-           [Pref="dom.w3c_pointer_events.enabled"]
-           attribute EventHandler onpointerenter;
-           [Pref="dom.w3c_pointer_events.enabled"]
-           attribute EventHandler onpointerleave;
-
            // Mozilla-specific handlers
            attribute EventHandler onmozfullscreenchange;
            attribute EventHandler onmozfullscreenerror;
            attribute EventHandler onmozpointerlockchange;
            attribute EventHandler onmozpointerlockerror;
 };
 
 [NoInterfaceObject]
deleted file mode 100644
--- a/dom/webidl/PointerEvent.webidl
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information see nsIPointerEvent.idl.
- *
- * Portions Copyright 2013 Microsoft Open Technologies, Inc. */
-
-interface WindowProxy;
-
-[Pref="dom.w3c_pointer_events.enabled",
- Constructor(DOMString type, optional PointerEventInit eventInitDict)]
-interface PointerEvent : MouseEvent
-{
-  readonly attribute long pointerId;
-  readonly attribute long width;
-  readonly attribute long height;
-  readonly attribute float pressure;
-  readonly attribute long tiltX;
-  readonly attribute long tiltY;
-  readonly attribute DOMString pointerType;
-  readonly attribute boolean isPrimary;
-};
-
-dictionary PointerEventInit : MouseEventInit
-{
-  long pointerId = 0;
-  long width = 0;
-  long height = 0;
-  float pressure = 0;
-  long tiltX = 0;
-  long tiltY = 0;
-  DOMString pointerType = "";
-  boolean isPrimary = false;
-};
-
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -249,17 +249,16 @@ WEBIDL_FILES = [
     'ParentNode.webidl',
     'Performance.webidl',
     'PerformanceNavigation.webidl',
     'PerformanceTiming.webidl',
     'PeriodicWave.webidl',
     'PhoneNumberService.webidl',
     'Plugin.webidl',
     'PluginArray.webidl',
-    'PointerEvent.webidl',
     'Position.webidl',
     'PositionError.webidl',
     'ProcessingInstruction.webidl',
     'Promise.webidl',
     'PushManager.webidl',
     'Range.webidl',
     'Rect.webidl',
     'RGBColor.webidl',
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1464,17 +1464,16 @@ nsPoint
 nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
                                              nsIFrame* aFrame)
 {
   if (!aEvent || (aEvent->eventStructType != NS_MOUSE_EVENT &&
                   aEvent->eventStructType != NS_MOUSE_SCROLL_EVENT &&
                   aEvent->eventStructType != NS_WHEEL_EVENT &&
                   aEvent->eventStructType != NS_DRAG_EVENT &&
                   aEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT &&
-                  aEvent->eventStructType != NS_POINTER_EVENT &&
                   aEvent->eventStructType != NS_GESTURENOTIFY_EVENT &&
                   aEvent->eventStructType != NS_TOUCH_EVENT &&
                   aEvent->eventStructType != NS_QUERY_CONTENT_EVENT))
     return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
 
   return GetEventCoordinatesRelativeTo(aEvent,
            LayoutDeviceIntPoint::ToUntyped(aEvent->AsGUIEvent()->refPoint),
            aFrame);
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -4380,19 +4380,16 @@ pref("dom.mozSettings.enabled", false);
 pref("dom.mozPermissionSettings.enabled", false);
 
 // W3C touch events
 // 0 - disabled, 1 - enabled, 2 - autodetect (win)
 #ifdef XP_WIN
 pref("dom.w3c_touch_events.enabled", 2);
 #endif
 
-// W3C draft pointer events
-pref("dom.w3c_pointer_events.enabled", false);
-
 // enable JS dump() function.
 pref("browser.dom.window.dump.enabled", false);
 
 // SPS Profiler
 pref("profiler.enabled", false);
 pref("profiler.interval", 10);
 pref("profiler.entries", 100000);
 
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -36,17 +36,16 @@ enum nsEventStructType
   NS_QUERY_CONTENT_EVENT,            // WidgetQueryContentEvent
   NS_SELECTION_EVENT,                // WidgetSelectionEvent
 
   // MouseEvents.h
   NS_MOUSE_EVENT,                    // WidgetMouseEvent
   NS_DRAG_EVENT,                     // WidgetDragEvent
   NS_MOUSE_SCROLL_EVENT,             // WidgetMouseScrollEvent
   NS_WHEEL_EVENT,                    // WidgetWheelEvent
-  NS_POINTER_EVENT,                  // PointerEvent
 
   // TouchEvents.h
   NS_GESTURENOTIFY_EVENT,            // WidgetGestureNotifyEvent
   NS_SIMPLE_GESTURE_EVENT,           // WidgetSimpleGestureEvent
   NS_TOUCH_EVENT,                    // WidgetTouchEvent
 
   // ContentEvents.h
   NS_SCRIPT_ERROR_EVENT,             // InternalScriptErrorEvent
@@ -131,29 +130,16 @@ enum nsEventStructType
 #define NS_MOUSE_CLICK                  (NS_MOUSE_MESSAGE_START + 27)
 #define NS_MOUSE_ACTIVATE               (NS_MOUSE_MESSAGE_START + 30)
 #define NS_MOUSE_ENTER_SYNTH            (NS_MOUSE_MESSAGE_START + 31)
 #define NS_MOUSE_EXIT_SYNTH             (NS_MOUSE_MESSAGE_START + 32)
 #define NS_MOUSE_MOZHITTEST             (NS_MOUSE_MESSAGE_START + 33)
 #define NS_MOUSEENTER                   (NS_MOUSE_MESSAGE_START + 34)
 #define NS_MOUSELEAVE                   (NS_MOUSE_MESSAGE_START + 35)
 
-// Pointer spec events
-#define NS_POINTER_EVENT_START          4400
-#define NS_POINTER_MOVE                 (NS_POINTER_EVENT_START)
-#define NS_POINTER_UP                   (NS_POINTER_EVENT_START + 1)
-#define NS_POINTER_DOWN                 (NS_POINTER_EVENT_START + 2)
-#define NS_POINTER_OVER                 (NS_POINTER_EVENT_START + 22)
-#define NS_POINTER_OUT                  (NS_POINTER_EVENT_START + 23)
-#define NS_POINTER_ENTER                (NS_POINTER_EVENT_START + 24)
-#define NS_POINTER_LEAVE                (NS_POINTER_EVENT_START + 25)
-#define NS_POINTER_CANCEL               (NS_POINTER_EVENT_START + 26)
-#define NS_POINTER_GOT_CAPTURE          (NS_POINTER_EVENT_START + 27)
-#define NS_POINTER_LOST_CAPTURE         (NS_POINTER_EVENT_START + 28)
-
 #define NS_CONTEXTMENU_MESSAGE_START    500
 #define NS_CONTEXTMENU                  (NS_CONTEXTMENU_MESSAGE_START)
 
 #define NS_STREAM_EVENT_START           1100
 #define NS_LOAD                         (NS_STREAM_EVENT_START)
 #define NS_PAGE_UNLOAD                  (NS_STREAM_EVENT_START + 1)
 #define NS_HASHCHANGE                   (NS_STREAM_EVENT_START + 2)
 #define NS_IMAGE_ABORT                  (NS_STREAM_EVENT_START + 3)
--- a/widget/EventClassList.h
+++ b/widget/EventClassList.h
@@ -28,17 +28,16 @@ NS_EVENT_CLASS(Widget, QueryContentEvent
 NS_EVENT_CLASS(Widget, SelectionEvent)
 
 // MouseEvents.h
 NS_EVENT_CLASS(Widget, MouseEventBase)
 NS_EVENT_CLASS(Widget, MouseEvent)
 NS_EVENT_CLASS(Widget, DragEvent)
 NS_EVENT_CLASS(Widget, MouseScrollEvent)
 NS_EVENT_CLASS(Widget, WheelEvent)
-NS_EVENT_CLASS(Widget, PointerEvent)
 
 // TouchEvents.h
 NS_EVENT_CLASS(Widget, GestureNotifyEvent)
 NS_EVENT_CLASS(Widget, SimpleGestureEvent)
 NS_EVENT_CLASS(Widget, TouchEvent)
 
 // ContentEvents.h
 NS_EVENT_CLASS(Internal, ScriptErrorEvent)
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -451,72 +451,11 @@ public:
     lineOrPageDeltaY = aEvent.lineOrPageDeltaY;
     scrollType = aEvent.scrollType;
     overflowDeltaX = aEvent.overflowDeltaX;
     overflowDeltaY = aEvent.overflowDeltaY;
     mViewPortIsOverscrolled = aEvent.mViewPortIsOverscrolled;
   }
 };
 
-/******************************************************************************
- * mozilla::WidgetPointerEvent
- ******************************************************************************/
-
-class WidgetPointerEvent : public WidgetMouseEvent
-{
-  friend class mozilla::dom::PBrowserParent;
-  friend class mozilla::dom::PBrowserChild;
-
-  WidgetPointerEvent()
-  {
-  }
-
-public:
-  virtual WidgetPointerEvent* AsPointerEvent() MOZ_OVERRIDE { return this; }
-
-  WidgetPointerEvent(bool aIsTrusted, uint32_t aMsg, nsIWidget* w)
-    : WidgetMouseEvent(aIsTrusted, aMsg, w, NS_POINTER_EVENT, eReal)
-    , pointerId(0)
-    , width(0)
-    , height(0)
-    , tiltX(0)
-    , tiltY(0)
-    , isPrimary(true)
-  {
-  }
-
-  WidgetPointerEvent(const WidgetMouseEvent& aEvent)
-    : WidgetMouseEvent(aEvent)
-    , pointerId(0)
-    , width(0)
-    , height(0)
-    , tiltX(0)
-    , tiltY(0)
-    , isPrimary(true)
-  {
-    eventStructType = NS_POINTER_EVENT;
-  }
-
-  WidgetPointerEvent(bool aIsTrusted, uint32_t aMsg, nsIWidget* w,
-                     uint32_t aPointerId,
-                     uint32_t aWidth, uint32_t aHeight,
-                     uint32_t aTiltX, uint32_t aTiltY, bool aIsPrimary)
-    : WidgetMouseEvent(aIsTrusted, aMsg, w, NS_POINTER_EVENT, eReal)
-    , pointerId(aPointerId)
-    , width(aWidth)
-    , height(aHeight)
-    , tiltX(aTiltX)
-    , tiltY(aTiltY)
-    , isPrimary(aIsPrimary)
-  {
-  }
-
-  uint32_t pointerId;
-  uint32_t width;
-  uint32_t height;
-  uint32_t tiltX;
-  uint32_t tiltY;
-  bool isPrimary;
-};
-
 } // namespace mozilla
 
 #endif // mozilla_MouseEvents_h__
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -202,46 +202,16 @@ struct ParamTraits<mozilla::WidgetMouseE
     aResult->context =
       static_cast<mozilla::WidgetMouseEvent::contextType>(context);
     aResult->exit = static_cast<mozilla::WidgetMouseEvent::exitType>(exit);
     return rv;
   }
 };
 
 template<>
-struct ParamTraits<mozilla::WidgetPointerEvent>
-{
-  typedef mozilla::WidgetPointerEvent paramType;
-
-  static void Write(Message* aMsg, const paramType& aParam)
-  {
-    WriteParam(aMsg, static_cast<mozilla::WidgetMouseEvent>(aParam));
-    WriteParam(aMsg, aParam.pointerId);
-    WriteParam(aMsg, aParam.width);
-    WriteParam(aMsg, aParam.height);
-    WriteParam(aMsg, aParam.tiltX);
-    WriteParam(aMsg, aParam.tiltY);
-    WriteParam(aMsg, aParam.isPrimary);
-  }
-
-  static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
-  {
-    bool rv =
-      ReadParam(aMsg, aIter, static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
-      ReadParam(aMsg, aIter, &aResult->pointerId) &&
-      ReadParam(aMsg, aIter, &aResult->width) &&
-      ReadParam(aMsg, aIter, &aResult->height) &&
-      ReadParam(aMsg, aIter, &aResult->tiltX) &&
-      ReadParam(aMsg, aIter, &aResult->tiltY) &&
-      ReadParam(aMsg, aIter, &aResult->isPrimary);
-    return rv;
-  }
-};
-
-template<>
 struct ParamTraits<mozilla::WidgetTouchEvent>
 {
   typedef mozilla::WidgetTouchEvent paramType;
 
   static void Write(Message* aMsg, const paramType& aParam)
   {
     WriteParam(aMsg, static_cast<const mozilla::WidgetInputEvent&>(aParam));
     // Sigh, Touch bites us again!  We want to be able to do
--- a/widget/shared/WidgetEventImpl.cpp
+++ b/widget/shared/WidgetEventImpl.cpp
@@ -211,17 +211,16 @@ WidgetEvent::IsTargetedAtFocusedContent(
          IsRetargetedNativeEventDelivererForPlugin();
 }
 
 bool
 WidgetEvent::IsAllowedToDispatchDOMEvent() const
 {
   switch (eventStructType) {
     case NS_MOUSE_EVENT:
-    case NS_POINTER_EVENT:
       // We want synthesized mouse moves to cause mouseover and mouseout
       // DOM events (nsEventStateManager::PreHandleEvent), but not mousemove
       // DOM events.
       // Synthesized button up events also do not cause DOM events because they
       // do not have a reliable refPoint.
       return AsMouseEvent()->reason == WidgetMouseEvent::eReal;
 
     case NS_WHEEL_EVENT: {