Bug 1487079 - Fix hasOrientation and hasPosition are switched on WebVR GamepadPose r=qdot,kip
authorImanol Fernandez <mortimergoro@gmail.com>
Wed, 29 Aug 2018 22:09:48 +0000
changeset 491745 5acb0074a4b37de8fcc0d727bfc68cc9a0c6bda3
parent 491744 8897c80e6240025264a58cf1b3ff7cbdf97c6e76
child 491746 8031da3e4c91cca4e32e9b5ef6e9ffba03e30eca
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot, kip
bugs1487079
milestone63.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 1487079 - Fix hasOrientation and hasPosition are switched on WebVR GamepadPose r=qdot,kip Differential Revision: https://phabricator.services.mozilla.com/D4534
dom/gamepad/GamepadPose.cpp
--- a/dom/gamepad/GamepadPose.cpp
+++ b/dom/gamepad/GamepadPose.cpp
@@ -36,23 +36,23 @@ GamepadPose::~GamepadPose()
 GamepadPose::WrapObject(JSContext* aJSContext, JS::Handle<JSObject*> aGivenProto)
 {
   return GamepadPose_Binding::Wrap(aJSContext, this, aGivenProto);
 }
 
 bool
 GamepadPose::HasOrientation() const
 {
-  return bool(mPoseState.flags & GamepadCapabilityFlags::Cap_Position);
+  return bool(mPoseState.flags & GamepadCapabilityFlags::Cap_Orientation);
 }
 
 bool
 GamepadPose::HasPosition() const
 {
-  return bool(mPoseState.flags & GamepadCapabilityFlags::Cap_Orientation);
+  return bool(mPoseState.flags & GamepadCapabilityFlags::Cap_Position);
 }
 
 void
 GamepadPose::GetPosition(JSContext* aJSContext,
                          JS::MutableHandle<JSObject*> aRetval,
                          ErrorResult& aRv)
 {
   SetFloat32Array(aJSContext, aRetval, mPosition,