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 434000 5acb0074a4b3
parent 433999 8897c80e6240
child 434001 8031da3e4c91
push id68511
push usercsabou@mozilla.com
push dateThu, 30 Aug 2018 00:31:24 +0000
treeherderautoland@5acb0074a4b3 [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,