From 6a9f5ff102c0f9b72dae14490608c22305a276ca Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Mon, 19 Dec 2016 12:40:02 +1100 Subject: [PATCH] Bug 1289642 - Remove prefixed PointerLock API. r=smaug MozReview-Commit-ID: BUSEojZNIgb --HG-- extra : rebase_source : bfdf71d5244d3b0877712a63cb07cf119c2e6992 --- dom/events/EventListenerManager.cpp | 21 --------------------- dom/webidl/Document.webidl | 4 ---- dom/webidl/Element.webidl | 2 -- dom/webidl/EventHandler.webidl | 4 ---- dom/webidl/MouseEvent.webidl | 5 ----- modules/libpref/init/all.js | 1 - 6 files changed, 37 deletions(-) diff --git a/dom/events/EventListenerManager.cpp b/dom/events/EventListenerManager.cpp index b03a362949f3..c52ab7a52625 100644 --- a/dom/events/EventListenerManager.cpp +++ b/dom/events/EventListenerManager.cpp @@ -120,19 +120,6 @@ IsWebkitPrefixSupportEnabled() return sIsWebkitPrefixSupportEnabled; } -static bool -IsPrefixedPointerLockEnabled() -{ - static bool sIsPrefixedPointerLockEnabled; - static bool sIsPrefCached = false; - if (!sIsPrefCached) { - sIsPrefCached = true; - Preferences::AddBoolVarCache(&sIsPrefixedPointerLockEnabled, - "pointer-lock-api.prefixed.enabled"); - } - return sIsPrefixedPointerLockEnabled; -} - EventListenerManagerBase::EventListenerManagerBase() : mNoListenerForEvent(eVoidEvent) , mMayHavePaintEventListener(false) @@ -1164,14 +1151,6 @@ EventListenerManager::GetLegacyEventMessage(EventMessage aEventMessage) const return eWebkitAnimationIteration; } } - if (IsPrefixedPointerLockEnabled()) { - if (aEventMessage == ePointerLockChange) { - return eMozPointerLockChange; - } - if (aEventMessage == ePointerLockError) { - return eMozPointerLockError; - } - } } switch (aEventMessage) { diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl index 366993c72280..d8c0e31a28e6 100644 --- a/dom/webidl/Document.webidl +++ b/dom/webidl/Document.webidl @@ -254,11 +254,7 @@ partial interface Document { // https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin partial interface Document { readonly attribute Element? pointerLockElement; - [BinaryName="pointerLockElement", Pref="pointer-lock-api.prefixed.enabled"] - readonly attribute Element? mozPointerLockElement; void exitPointerLock(); - [BinaryName="exitPointerLock", Pref="pointer-lock-api.prefixed.enabled"] - void mozExitPointerLock(); // Event handlers attribute EventHandler onpointerlockchange; diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl index 29efbdeb82f1..86d82c19537c 100644 --- a/dom/webidl/Element.webidl +++ b/dom/webidl/Element.webidl @@ -260,6 +260,4 @@ partial interface Element { partial interface Element { [UnsafeInPrerendering, NeedsCallerType] void requestPointerLock(); - [UnsafeInPrerendering, BinaryName="requestPointerLock", Pref="pointer-lock-api.prefixed.enabled", NeedsCallerType] - void mozRequestPointerLock(); }; diff --git a/dom/webidl/EventHandler.webidl b/dom/webidl/EventHandler.webidl index 24ea9126147f..83799a6be4b3 100644 --- a/dom/webidl/EventHandler.webidl +++ b/dom/webidl/EventHandler.webidl @@ -120,10 +120,6 @@ interface GlobalEventHandlers { // Document rather than here. attribute EventHandler onmozfullscreenchange; attribute EventHandler onmozfullscreenerror; - [Pref="pointer-lock-api.prefixed.enabled"] - attribute EventHandler onmozpointerlockchange; - [Pref="pointer-lock-api.prefixed.enabled"] - attribute EventHandler onmozpointerlockerror; // CSS-Animation and CSS-Transition handlers. attribute EventHandler onanimationend; diff --git a/dom/webidl/MouseEvent.webidl b/dom/webidl/MouseEvent.webidl index 3ebc46c9f98c..9492a86eb56f 100644 --- a/dom/webidl/MouseEvent.webidl +++ b/dom/webidl/MouseEvent.webidl @@ -77,11 +77,6 @@ dictionary MouseEventInit : EventModifierInit { // Mozilla extensions partial interface MouseEvent { - [BinaryName="movementX", Pref="pointer-lock-api.prefixed.enabled"] - readonly attribute long mozMovementX; - [BinaryName="movementY", Pref="pointer-lock-api.prefixed.enabled"] - readonly attribute long mozMovementY; - // Finger or touch pressure event value // ranges between 0.0 and 1.0 readonly attribute float mozPressure; diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 2c97e13b713f..e60fdcafc872 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -4818,7 +4818,6 @@ pref("full-screen-api.warning.timeout", 3000); pref("full-screen-api.warning.delay", 500); // DOM pointerlock API -pref("pointer-lock-api.prefixed.enabled", false); // time for the warning box stays on the screen before sliding out, unit: ms pref("pointer-lock-api.warning.timeout", 3000);