Title: [205247] trunk
Revision
205247
Author
[email protected]
Date
2016-08-31 07:38:21 -0700 (Wed, 31 Aug 2016)

Log Message

WK2 Gamepad provider on iOS.
https://bugs.webkit.org/show_bug.cgi?id=161412

Reviewed by Tim Horton.

Source/_javascript_Core:

* 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:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (205246 => 205247)


--- trunk/Source/_javascript_Core/ChangeLog	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-08-31 14:38:21 UTC (rev 205247)
@@ -1,3 +1,12 @@
+2016-08-31  Brady Eidson  <[email protected]>
+
+        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  <[email protected]>
 
         [JSC] Some arith nodes are too pessimistic with the types supported on the fast path

Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (205246 => 205247)


--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-08-31 14:38:21 UTC (rev 205247)
@@ -80,7 +80,7 @@
 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;

Modified: trunk/Source/WebCore/ChangeLog (205246 => 205247)


--- trunk/Source/WebCore/ChangeLog	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/ChangeLog	2016-08-31 14:38:21 UTC (rev 205247)
@@ -1,3 +1,14 @@
+2016-08-31  Brady Eidson  <[email protected]>
+
+        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  <[email protected]>
 
         REGRESSION (r201701): Unable to copy from CodeMirror editor version used in Jenkins install website

Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (205246 => 205247)


--- trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2016-08-31 14:38:21 UTC (rev 205247)
@@ -80,7 +80,7 @@
 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;

Modified: trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h (205246 => 205247)


--- trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD) && defined(__LP64__)
-
+#endif // ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))

Modified: trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm (205246 => 205247)


--- trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD) && defined(__LP64__)
+#endif // ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))

Modified: trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.h (205246 => 205247)


--- trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.h	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.h	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))

Modified: trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm (205246 => 205247)


--- trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && (defined(__LP64__) || PLATFORM(IOS))

Modified: trunk/Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp (205246 => 205247)


--- trunk/Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)

Modified: trunk/Source/WebCore/platform/gamepad/mac/HIDGamepad.h (205246 => 205247)


--- trunk/Source/WebCore/platform/gamepad/mac/HIDGamepad.h	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/platform/gamepad/mac/HIDGamepad.h	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)

Modified: trunk/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp (205246 => 205247)


--- trunk/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)

Modified: trunk/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.h (205246 => 205247)


--- trunk/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.h	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.h	2016-08-31 14:38:21 UTC (rev 205247)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(GAMEPAD)
+#if ENABLE(GAMEPAD) && PLATFORM(MAC)
 
 #include "GamepadProvider.h"
 #include "HIDGamepad.h"
@@ -85,4 +85,4 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)

Modified: trunk/Source/WebKit/mac/ChangeLog (205246 => 205247)


--- trunk/Source/WebKit/mac/ChangeLog	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-08-31 14:38:21 UTC (rev 205247)
@@ -1,3 +1,15 @@
+2016-08-31  Brady Eidson  <[email protected]>
+
+        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  <[email protected]>
 
         Introduce the ThrowScope and force every throw site to instantiate a ThrowScope.

Modified: trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig (205246 => 205247)


--- trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig	2016-08-31 14:38:21 UTC (rev 205247)
@@ -80,7 +80,7 @@
 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;

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (205246 => 205247)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2016-08-31 14:38:21 UTC (rev 205247)
@@ -140,6 +140,7 @@
 #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 @@
     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 @@
 {
     ASSERT(WebThreadIsCurrent());
     WebKit::MemoryMeasure measurer("Memory warning: Calling _javascript_ GC.");
-    GCController::singleton().garbageCollectNow();
+    WebCore::GCController::singleton().garbageCollectNow();
 }
 
 + (void)purgeInactiveFontData
@@ -1440,7 +1446,7 @@
 {
     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 @@
 #ifndef NDEBUG
     // Need this to make leak messages accurate.
     if (applicationIsTerminating) {
-        GCController::singleton().garbageCollectNow();
+        WebCore::GCController::singleton().garbageCollectNow();
         [WebCache setDisabled:YES];
     }
 #endif

Modified: trunk/Source/WebKit2/ChangeLog (205246 => 205247)


--- trunk/Source/WebKit2/ChangeLog	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit2/ChangeLog	2016-08-31 14:38:21 UTC (rev 205247)
@@ -1,3 +1,23 @@
+2016-08-31  Brady Eidson  <[email protected]>
+
+        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  <[email protected]>
 
         Try to fix the 32-bit build.

Modified: trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig (205246 => 205247)


--- trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig	2016-08-31 14:38:21 UTC (rev 205247)
@@ -80,7 +80,7 @@
 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;

Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (205246 => 205247)


--- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h	2016-08-31 14:38:21 UTC (rev 205247)
@@ -825,6 +825,10 @@
 - (CGRect)accessibilityConvertRectToSceneReferenceCoordinates:(CGRect)rect;
 @end
 
+@interface UIResponder ()
+- (UIResponder *)firstResponder;
+@end
+
 WTF_EXTERN_C_BEGIN
 
 BOOL UIKeyboardEnabledInputModesAllowOneToManyShortcuts();

Modified: trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp (205246 => 205247)


--- trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp	2016-08-31 14:38:21 UTC (rev 205247)
@@ -223,7 +223,7 @@
     return gamepadDatas;
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 
 void UIGamepadProvider::platformSetDefaultGamepadProvider()
 {

Copied: trunk/Source/WebKit2/UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm (from rev 205246, trunk/Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm) (0 => 205247)


--- trunk/Source/WebKit2/UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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)

Modified: trunk/Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm (205246 => 205247)


--- trunk/Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm	2016-08-31 14:38:21 UTC (rev 205247)
@@ -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 @@
 
 }
 
-#endif // ENABLE(GAMEPAD)
+#endif // ENABLE(GAMEPAD) && PLATFORM(MAC)

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (205246 => 205247)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-08-31 14:38:21 UTC (rev 205247)
@@ -1016,6 +1016,7 @@
 		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 */; };
@@ -3077,6 +3078,7 @@
 		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; };
@@ -5502,6 +5504,7 @@
 			isa = PBXGroup;
 			children = (
 				51E399041D6F54AD009C8831 /* cocoa */,
+				51E949951D761CB000EC9EB9 /* ios */,
 				515BE1A11D5523B300DD7C68 /* mac */,
 				515BE1AC1D555C5100DD7C68 /* UIGamepad.cpp */,
 				515BE1AD1D555C5100DD7C68 /* UIGamepad.h */,
@@ -5626,6 +5629,14 @@
 			path = cocoa;
 			sourceTree = "<group>";
 		};
+		51E949951D761CB000EC9EB9 /* ios */ = {
+			isa = PBXGroup;
+			children = (
+				51E949961D761CC700EC9EB9 /* UIGamepadProviderIOS.mm */,
+			);
+			path = ios;
+			sourceTree = "<group>";
+		};
 		51F7DC0A180CC41100212CA3 /* DatabaseProcess */ = {
 			isa = PBXGroup;
 			children = (
@@ -9710,6 +9721,7 @@
 				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 */,

Modified: trunk/Tools/ChangeLog (205246 => 205247)


--- trunk/Tools/ChangeLog	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Tools/ChangeLog	2016-08-31 14:38:21 UTC (rev 205247)
@@ -1,3 +1,12 @@
+2016-08-31  Brady Eidson  <[email protected]>
+
+        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  <[email protected]>
 
         YouTubePluginReplacementTest's URL transformation logic should have tests

Modified: trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig (205246 => 205247)


--- trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig	2016-08-31 09:12:25 UTC (rev 205246)
+++ trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig	2016-08-31 14:38:21 UTC (rev 205247)
@@ -80,7 +80,7 @@
 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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to