WK2 Gamepad provider on iOS.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Aug 2016 14:38:21 +0000 (14:38 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Aug 2016 14:38:21 +0000 (14:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161412

Reviewed by Tim Horton.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests (Native framework backends not directly testable)

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

* WebView/WebView.mm:
(WebKitInitializeGamepadProviderIfNecessary):

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

* Platform/spi/ios/UIKitSPI.h:

* UIProcess/Gamepad/UIGamepadProvider.cpp:

* UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm.
(WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):

* UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:

* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205247 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.h
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm
Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp
Source/WebCore/platform/gamepad/mac/HIDGamepad.h
Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp
Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
Source/WebKit2/Platform/spi/ios/UIKitSPI.h
Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp
Source/WebKit2/UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm [new file with mode: 0644]
Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig

index b684b9f..041826a 100644 (file)
@@ -1,3 +1,12 @@
+2016-08-31  Brady Eidson  <beidson@apple.com>
+
+        WK2 Gamepad provider on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=161412
+
+        Reviewed by Tim Horton.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2016-08-30  Benjamin Poulain  <bpoulain@apple.com>
 
         [JSC] Some arith nodes are too pessimistic with the types supported on the fast path
index a673951..b0da567 100644 (file)
@@ -80,7 +80,7 @@ ENABLE_FETCH_API = ENABLE_FETCH_API;
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 ENABLE_FONT_LOAD_EVENTS = ;
 ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
-ENABLE_GAMEPAD[sdk=macosx*] = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD = ENABLE_GAMEPAD;
 ENABLE_GAMEPAD_DEPRECATED = ;
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
index 9745c05..659627c 100644 (file)
@@ -1,3 +1,14 @@
+2016-08-31  Brady Eidson  <beidson@apple.com>
+
+        WK2 Gamepad provider on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=161412
+
+        Reviewed by Tim Horton.
+
+        No new tests (Native framework backends not directly testable)
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2016-08-31  Antti Koivisto  <antti@apple.com>
 
         REGRESSION (r201701): Unable to copy from CodeMirror editor version used in Jenkins install website
index a673951..b0da567 100644 (file)
@@ -80,7 +80,7 @@ ENABLE_FETCH_API = ENABLE_FETCH_API;
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 ENABLE_FONT_LOAD_EVENTS = ;
 ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
-ENABLE_GAMEPAD[sdk=macosx*] = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD = ENABLE_GAMEPAD;
 ENABLE_GAMEPAD_DEPRECATED = ;
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
index 38cc07d..994d972 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(GAMEPAD) && defined(__LP64__)
+#if ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))
 
 #include "PlatformGamepad.h"
 #include <wtf/RetainPtr.h>
@@ -64,5 +64,4 @@ private:
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD) && defined(__LP64__)
-
+#endif // ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))
index 80b0943..1f252f4 100644 (file)
@@ -25,7 +25,7 @@
 #include "config.h"
 #include "GameControllerGamepad.h"
 
-#if ENABLE(GAMEPAD) && defined(__LP64__)
+#if ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))
 #include "GameControllerGamepadProvider.h"
 #include <GameController/GameController.h>
 #include <wtf/CurrentTime.h>
@@ -177,4 +177,4 @@ void GameControllerGamepad::setupAsGamepad()
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD) && defined(__LP64__)
+#endif // ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))
index f700fcc..af01b8d 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(GAMEPAD) && defined(__LP64__)
+#if ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))
 
 #include "GamepadProvider.h"
 #include <wtf/HashMap.h>
@@ -88,4 +88,4 @@ private:
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))
index e08a5c5..20a7fed 100644 (file)
@@ -25,7 +25,7 @@
 #import "config.h"
 #import "GameControllerGamepadProvider.h"
 
-#if ENABLE(GAMEPAD) && defined(__LP64__)
+#if ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))
 
 #import "GameControllerGamepad.h"
 #import "GamepadProviderClient.h"
@@ -157,4 +157,4 @@ void GameControllerGamepadProvider::inputNotificationTimerFired()
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))
index 77c18e3..d0aaec2 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "HIDGamepad.h"
 
-#if ENABLE(GAMEPAD)
+#if ENABLE(GAMEPAD) && PLATFORM(MAC)
 
 #include <IOKit/hid/IOHIDElement.h>
 #include <IOKit/hid/IOHIDUsageTables.h>
@@ -187,4 +187,4 @@ void HIDGamepad::valueChanged(IOHIDValueRef value)
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)
index 33afeb3..28402c5 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(GAMEPAD)
+#if ENABLE(GAMEPAD) && PLATFORM(MAC)
 
 #include "PlatformGamepad.h"
 #include <IOKit/hid/IOHIDDevice.h>
@@ -123,4 +123,4 @@ private:
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)
index 24611c8..0d8a79a 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "HIDGamepadProvider.h"
 
-#if ENABLE(GAMEPAD)
+#if ENABLE(GAMEPAD) && PLATFORM(MAC)
 
 #include "GamepadProviderClient.h"
 #include "Logging.h"
@@ -268,4 +268,4 @@ std::unique_ptr<HIDGamepad> HIDGamepadProvider::removeGamepadForDevice(IOHIDDevi
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)
index 167aef5..504cb4c 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(GAMEPAD)
+#if ENABLE(GAMEPAD) && PLATFORM(MAC)
 
 #include "GamepadProvider.h"
 #include "HIDGamepad.h"
@@ -85,4 +85,4 @@ private:
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)
index 60b7df7..31a9ea5 100644 (file)
@@ -1,3 +1,15 @@
+2016-08-31  Brady Eidson  <beidson@apple.com>
+
+        WK2 Gamepad provider on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=161412
+
+        Reviewed by Tim Horton.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+        * WebView/WebView.mm:
+        (WebKitInitializeGamepadProviderIfNecessary):
+
 2016-08-30  Mark Lam  <mark.lam@apple.com>
 
         Introduce the ThrowScope and force every throw site to instantiate a ThrowScope.
index a673951..b0da567 100644 (file)
@@ -80,7 +80,7 @@ ENABLE_FETCH_API = ENABLE_FETCH_API;
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 ENABLE_FONT_LOAD_EVENTS = ;
 ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
-ENABLE_GAMEPAD[sdk=macosx*] = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD = ENABLE_GAMEPAD;
 ENABLE_GAMEPAD_DEPRECATED = ;
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
index 963b0cf..16dc361 100644 (file)
 #import <WebCore/FrameTree.h>
 #import <WebCore/FrameView.h>
 #import <WebCore/GCController.h>
+#import <WebCore/GameControllerGamepadProvider.h>
 #import <WebCore/GeolocationController.h>
 #import <WebCore/GeolocationError.h>
 #import <WebCore/HTMLNames.h>
@@ -910,7 +911,12 @@ static void WebKitInitializeGamepadProviderIfNecessary()
     if (initialized)
         return;
 
+#if PLATFORM(MAC)
     GamepadProvider::singleton().setSharedProvider(HIDGamepadProvider::singleton());
+#else
+    GamepadProvider::singleton().setSharedProvider(GameControllerGamepadProvider::singleton());
+#endif
+
     initialized = true;
 }
 #endif
@@ -1419,7 +1425,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
 {
     ASSERT(WebThreadIsCurrent());
     WebKit::MemoryMeasure measurer("Memory warning: Calling JavaScript GC.");
-    GCController::singleton().garbageCollectNow();
+    WebCore::GCController::singleton().garbageCollectNow();
 }
 
 + (void)purgeInactiveFontData
@@ -1440,7 +1446,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
 {
     ASSERT(WebThreadIsCurrent());
     WebKit::MemoryMeasure measurer("Memory warning: Discarding JIT'ed code.");
-    GCController::singleton().deleteAllCode();
+    WebCore::GCController::singleton().deleteAllCode();
 }
 
 + (BOOL)isCharacterSmartReplaceExempt:(unichar)character isPreviousCharacter:(BOOL)b
@@ -1877,7 +1883,7 @@ static bool fastDocumentTeardownEnabled()
 #ifndef NDEBUG
     // Need this to make leak messages accurate.
     if (applicationIsTerminating) {
-        GCController::singleton().garbageCollectNow();
+        WebCore::GCController::singleton().garbageCollectNow();
         [WebCache setDisabled:YES];
     }
 #endif
index 212bd56..a6fd3ce 100644 (file)
@@ -1,3 +1,23 @@
+2016-08-31  Brady Eidson  <beidson@apple.com>
+
+        WK2 Gamepad provider on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=161412
+
+        Reviewed by Tim Horton.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+        * Platform/spi/ios/UIKitSPI.h:
+
+        * UIProcess/Gamepad/UIGamepadProvider.cpp:
+
+        * UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm.
+        (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
+
+        * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:
+
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2016-08-30  Anders Carlsson  <andersca@apple.com>
 
         Try to fix the 32-bit build.
index a673951..b0da567 100644 (file)
@@ -80,7 +80,7 @@ ENABLE_FETCH_API = ENABLE_FETCH_API;
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 ENABLE_FONT_LOAD_EVENTS = ;
 ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
-ENABLE_GAMEPAD[sdk=macosx*] = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD = ENABLE_GAMEPAD;
 ENABLE_GAMEPAD_DEPRECATED = ;
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;
index dd659b0..e67e833 100644 (file)
@@ -825,6 +825,10 @@ typedef enum {
 - (CGRect)accessibilityConvertRectToSceneReferenceCoordinates:(CGRect)rect;
 @end
 
+@interface UIResponder ()
+- (UIResponder *)firstResponder;
+@end
+
 WTF_EXTERN_C_BEGIN
 
 BOOL UIKeyboardEnabledInputModesAllowOneToManyShortcuts();
index 7bddd40..a8776b4 100644 (file)
@@ -223,7 +223,7 @@ Vector<GamepadData> UIGamepadProvider::snapshotGamepads()
     return gamepadDatas;
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 
 void UIGamepadProvider::platformSetDefaultGamepadProvider()
 {
diff --git a/Source/WebKit2/UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm b/Source/WebKit2/UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm
new file mode 100644 (file)
index 0000000..4956cd0
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "UIGamepadProvider.h"
+
+#if ENABLE(GAMEPAD) && PLATFORM(IOS)
+
+#import "UIKitSPI.h"
+#import "WKWebViewInternal.h"
+
+namespace WebKit {
+
+WebPageProxy* UIGamepadProvider::platformWebPageProxyForGamepadInput()
+{
+    auto firstResponder = [[[UIApplication sharedApplication] keyWindow] firstResponder];
+
+    if ([firstResponder isKindOfClass:[WKContentView class]])
+        return ((WKContentView *)firstResponder).page;
+
+    return nullptr;
+}
+
+}
+
+#endif // ENABLE(GAMEPAD) && PLATFORM(IOS)
index 4b81f08..e5262fa 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "UIGamepadProvider.h"
 
-#if ENABLE(GAMEPAD)
+#if ENABLE(GAMEPAD) && PLATFORM(MAC)
 
 #import "WebPageProxy.h"
 #import "WKAPICast.h"
@@ -52,4 +52,4 @@ WebPageProxy* UIGamepadProvider::platformWebPageProxyForGamepadInput()
 
 }
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)
index cff8460..d43c7ef 100644 (file)
                51E35202180F5D1E00E53BE9 /* DatabaseProcessMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E35201180F5D1E00E53BE9 /* DatabaseProcessMac.mm */; };
                51E35209180F5D6B00E53BE9 /* DatabaseServiceEntryPoint.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E35208180F5D6B00E53BE9 /* DatabaseServiceEntryPoint.mm */; };
                51E399061D6F54C7009C8831 /* UIGamepadProviderCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E399051D6F54C5009C8831 /* UIGamepadProviderCocoa.mm */; };
+               51E949971D76211300EC9EB9 /* UIGamepadProviderIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E949961D761CC700EC9EB9 /* UIGamepadProviderIOS.mm */; };
                51EFC1CF1524E62500C9A938 /* WKBundleDOMWindowExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FA2D541521118600C1BA0B /* WKBundleDOMWindowExtension.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F060DE1654317500F3281B /* WebResourceLoaderMessages.h */; };
                51F060E11654318500F3281B /* WebResourceLoaderMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F060DD1654317500F3281B /* WebResourceLoaderMessageReceiver.cpp */; };
                51E35207180F5D6100E53BE9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
                51E35208180F5D6B00E53BE9 /* DatabaseServiceEntryPoint.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DatabaseServiceEntryPoint.mm; sourceTree = "<group>"; };
                51E399051D6F54C5009C8831 /* UIGamepadProviderCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIGamepadProviderCocoa.mm; sourceTree = "<group>"; };
+               51E949961D761CC700EC9EB9 /* UIGamepadProviderIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIGamepadProviderIOS.mm; sourceTree = "<group>"; };
                51F060DD1654317500F3281B /* WebResourceLoaderMessageReceiver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceLoaderMessageReceiver.cpp; sourceTree = "<group>"; };
                51F060DE1654317500F3281B /* WebResourceLoaderMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebResourceLoaderMessages.h; sourceTree = "<group>"; };
                51F7DC4A180CC93600212CA3 /* com.apple.WebKit.Databases.Development.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = com.apple.WebKit.Databases.Development.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
                        isa = PBXGroup;
                        children = (
                                51E399041D6F54AD009C8831 /* cocoa */,
+                               51E949951D761CB000EC9EB9 /* ios */,
                                515BE1A11D5523B300DD7C68 /* mac */,
                                515BE1AC1D555C5100DD7C68 /* UIGamepad.cpp */,
                                515BE1AD1D555C5100DD7C68 /* UIGamepad.h */,
                        path = cocoa;
                        sourceTree = "<group>";
                };
+               51E949951D761CB000EC9EB9 /* ios */ = {
+                       isa = PBXGroup;
+                       children = (
+                               51E949961D761CC700EC9EB9 /* UIGamepadProviderIOS.mm */,
+                       );
+                       path = ios;
+                       sourceTree = "<group>";
+               };
                51F7DC0A180CC41100212CA3 /* DatabaseProcess */ = {
                        isa = PBXGroup;
                        children = (
                                BC989D81161A7E5D000D46D3 /* WKWebProcessPlugIn.mm in Sources */,
                                BC8F2F2A16273A2C005FACB5 /* WKWebProcessPlugInBrowserContextController.mm in Sources */,
                                1F7506AD1859161C00EC0FF7 /* WKWebProcessPlugInFrame.mm in Sources */,
+                               51E949971D76211300EC9EB9 /* UIGamepadProviderIOS.mm in Sources */,
                                1F7506AE1859162200EC0FF7 /* WKWebProcessPlugInHitTestResult.mm in Sources */,
                                1F7506AF1859162800EC0FF7 /* WKWebProcessPlugInNodeHandle.mm in Sources */,
                                1FB00AC8185F76460019142E /* WKWebProcessPlugInPageGroup.mm in Sources */,
index 70e07d0..50d5171 100644 (file)
@@ -1,3 +1,12 @@
+2016-08-31  Brady Eidson  <beidson@apple.com>
+
+        WK2 Gamepad provider on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=161412
+
+        Reviewed by Tim Horton.
+
+        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
+
 2016-08-30  Ricky Mondello  <rmondello@apple.com>
 
         YouTubePluginReplacementTest's URL transformation logic should have tests
index a673951..b0da567 100644 (file)
@@ -80,7 +80,7 @@ ENABLE_FETCH_API = ENABLE_FETCH_API;
 ENABLE_FILTERS_LEVEL_2 = ENABLE_FILTERS_LEVEL_2;
 ENABLE_FONT_LOAD_EVENTS = ;
 ENABLE_FULLSCREEN_API[sdk=macosx*] = ENABLE_FULLSCREEN_API;
-ENABLE_GAMEPAD[sdk=macosx*] = ENABLE_GAMEPAD;
+ENABLE_GAMEPAD = ENABLE_GAMEPAD;
 ENABLE_GAMEPAD_DEPRECATED = ;
 ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
 ENABLE_ICONDATABASE[sdk=macosx*] = ENABLE_ICONDATABASE;