• Raphael Kubo da Costa's avatar
    gamepad: Use FrozenArrays for Gamepad#axes and Gamepad#buttons. · 69b90aa1
    Raphael Kubo da Costa authored
    Sync our IDL file with https://github.com/w3c/gamepad/pull/62 ("Switch from
    WebIDL arrays to FrozenArray<>s in the IDLs").
    
    WebIDL has not had array types since 2015, so finally make our IDL files
    compliant with modern WebIDL following the spec fix.
    
    It is important to note that this change modifies the existing behavior
    slightly.
    - |axes| and |buttons| are now frozen objects with all the related
      consequences for its properties and prototype.
    - Those two attributes now return the same _object_ until their values
      change instead of always returning a new object on access.
    
    Doing so aligns our code with both the spec as well as Gecko, which has done
    the above ever since it implemented the Gamepad spec.
    
    Bug: 740875
    Change-Id: Ifb618c9d4f8860eb55efc882e701dae7390808a5
    Reviewed-on: https://chromium-review.googlesource.com/595979Reviewed-by: default avatarMatt Reynolds <mattreynolds@chromium.org>
    Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
    Cr-Commit-Position: refs/heads/master@{#491440}
    69b90aa1
Gamepad.h 3.39 KB