-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=71753 Patch by Scott Graham <scottmg@chromium.org> on 2011-11-18 Reviewed by Adam Barth. Source/WebCore: IDL changes and associated plumbing to expose list of gamepad objects on navigator object (per current spec). Full patch is https://bugs.webkit.org/show_bug.cgi?id=69451. Only basic existence test until more plumbing in future patches. Test: gamepad/gamepad-api.html * WebCore.gypi: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setWebkitGamepadsEnabled): (WebCore::RuntimeEnabledFeatures::webkitGamepadsEnabled): * page/Gamepad.cpp: Added. (WebCore::Gamepad::Gamepad): (WebCore::Gamepad::axes): (WebCore::Gamepad::buttons): (WebCore::Gamepad::~Gamepad): * page/Gamepad.h: Added. * page/Gamepad.idl: Added. * page/GamepadList.cpp: Added. (WebCore::GamepadList::~GamepadList): (WebCore::GamepadList::set): (WebCore::GamepadList::length): (WebCore::GamepadList::item): * page/GamepadList.h: Added. (WebCore::GamepadList::create): (WebCore::GamepadList::GamepadList): * page/GamepadList.idl: Added. * page/Navigator.cpp: (WebCore::Navigator::webkitGamepads): * page/Navigator.h: * page/Navigator.idl: Source/WebKit/chromium: Update to use vendor-prefixed enable. * src/WebRuntimeFeatures.cpp: (WebKit::WebRuntimeFeatures::enableGamepad): (WebKit::WebRuntimeFeatures::isGamepadEnabled): Tools: Runtime enable gamepad in chromium test shell. * DumpRenderTree/chromium/TestShell.cpp: (TestShell::TestShell): LayoutTests: Add basic api existence test. * gamepad/gamepad-api-expected.txt: Added. * gamepad/gamepad-api.html: Added. * gamepad/gamepad-test.js: Added. (logConsole): (testExpected): (reportExpected): (waitForEventAndEnd): (waitForEvent._eventCallback): (waitForEvent): (waitForEventAndTest._eventCallback): (waitForEventAndTest): (waitForEventTestAndEnd): (endTest): (logResult): (consoleWrite): * platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt: * platform/efl/Skipped: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: * platform/wincairo/Skipped: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0ef17682