Skip to content
  • commit-queue@webkit.org's avatar
    Change navigator.webkitGamepads[] to navigator.webkitGetGamepads() · 7bf16a6b
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=92533
    
    Patch by Scott Graham <scottmg@chromium.org> on 2012-07-27
    Reviewed by Adam Barth.
    
    Source/WebCore:
    
    Per discussion on public-webapps. Pages that enumerate navigator were
    causing background resources to be created to poll hardware
    unintentionally. By changing to an explicit function call, this is
    avoided (and the API becomes more clear too). This change updates the
    implementation to match the current ED spec.
    
    * Modules/gamepad/NavigatorGamepad.cpp:
    (WebCore::NavigatorGamepad::webkitGetGamepads):
    * Modules/gamepad/NavigatorGamepad.h:
    (NavigatorGamepad):
    * Modules/gamepad/NavigatorGamepad.idl:
    * bindings/generic/RuntimeEnabledFeatures.h:
    (WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
    (WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
    
    Source/WebKit/chromium:
    
    Renames for updated access point.
    
    * src/WebRuntimeFeatures.cpp:
    (WebKit::WebRuntimeFeatures::enableGamepad):
    (WebKit::WebRuntimeFeatures::isGamepadEnabled):
    
    LayoutTests:
    
    Updates for renamed access point.
    
    * gamepad/gamepad-api-expected.txt:
    * gamepad/gamepad-api.html:
    * gamepad/gamepad-polling-access-expected.txt:
    * gamepad/gamepad-polling-access.html:
    * platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7bf16a6b