Re-create XRInputSource when handedness or target ray mode changes.

Also fire an inputsourceschange event when this happens. This behavior
is required by the WebXR spec.

The browser test verifies that changing the XRInputSource handedness
causes it to be re-created while firing the appropriate events.

The layout test uses MockXRInputSource and verifies for both handedness
and target ray mode attributes that changing them causes the
XRInputSource to be re-created while firing the appropriate events.

Bug: 958019
Change-Id: Ifdca807536e3c8116f9dc7fb3dbfb15f8e946c37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616442
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Bill Orr <billorr@chromium.org>
Commit-Queue: Jacob DeWitt <jacde@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661438}
5 files changed