<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[205756] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/205756">205756</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-09-09 11:44:14 -0700 (Fri, 09 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Soft-link GameController.framework.
&lt;rdar://problem/28219953&gt; and https://bugs.webkit.org/show_bug.cgi?id=161802

Reviewed by Brian Burg.

No new tests (No change in behavior).

* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
(WebCore::GameControllerGamepadProvider::startMonitoringGamepads):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreConfigurationsWebCorexcconfig">trunk/Source/WebCore/Configurations/WebCore.xcconfig</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformgamepadcocoaGameControllerGamepadProvidermm">trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (205755 => 205756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-09 18:38:47 UTC (rev 205755)
+++ trunk/Source/WebCore/ChangeLog        2016-09-09 18:44:14 UTC (rev 205756)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-09-09  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Soft-link GameController.framework.
+        &lt;rdar://problem/28219953&gt; and https://bugs.webkit.org/show_bug.cgi?id=161802
+
+        Reviewed by Brian Burg.
+
+        No new tests (No change in behavior).
+
+        * Configurations/WebCore.xcconfig:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
+        (WebCore::GameControllerGamepadProvider::startMonitoringGamepads):
+
</ins><span class="cx"> 2016-09-09  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rename Key to CryptoKey
</span></span></pre></div>
<a id="trunkSourceWebCoreConfigurationsWebCorexcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (205755 => 205756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Configurations/WebCore.xcconfig        2016-09-09 18:38:47 UTC (rev 205755)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig        2016-09-09 18:44:14 UTC (rev 205756)
</span><span class="lines">@@ -65,11 +65,7 @@
</span><span class="cx"> WK_IOS_BINCOMPAT_LDFLAGS_V9_3 = $(WK_IOS_BINCOMPAT_LDFLAGS_V9_0);
</span><span class="cx"> WK_IOS_BINCOMPAT_LDFLAGS_V10_0 = $(WK_IOS_BINCOMPAT_LDFLAGS_V9_3);
</span><span class="cx"> 
</span><del>-WK_GAMECONTROLLER_LDFLAGS = $(WK_GAMECONTROLLER_LDFLAGS_$(ENABLE_GAMEPAD));
-WK_GAMECONTROLLER_LDFLAGS_ENABLE_GAMEPAD = -framework GameController;
-WK_GAMECONTROLLER_LDFLAGS_ENABLE_GAMEPAD[sdk=macosx*] = -weak_framework GameController;
-
-OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_PLATFORM) $(WK_GAMECONTROLLER_LDFLAGS);
</del><ins>+OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_PLATFORM)
</ins><span class="cx"> OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE;
</span><span class="cx"> OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework MobileCoreServices -framework OpenGLES -lMobileGestalt $(WK_IOS_BINCOMPAT_LDFLAGS);
</span><span class="cx"> OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (205755 => 205756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-09-09 18:38:47 UTC (rev 205755)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-09-09 18:44:14 UTC (rev 205756)
</span><span class="lines">@@ -9152,7 +9152,6 @@
</span><span class="cx">                 51ABAE1C103C1913008C5260 /* SocketStreamHandleImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStreamHandleImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51ABAE1D103C1913008C5260 /* SocketStreamHandleImplCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketStreamHandleImplCFNet.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51ABF64C16392E2800132A7A /* LoaderStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoaderStrategy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51AEA4C81D6E3CC100E0269D /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = ../../../../../../System/Library/Frameworks/GameController.framework; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51AF503516F100F60095B2E8 /* ResourceLoaderTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoaderTypes.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyWebArchiveMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51B454E91B4DAE7D0085EAA6 /* PingHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingHandle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -14838,7 +14837,6 @@
</span><span class="cx">                                 FD2DBF0E12B048A300ED98C6 /* Accelerate.framework */,
</span><span class="cx">                                 FD2DBF0F12B048A300ED98C6 /* AudioToolbox.framework */,
</span><span class="cx">                                 AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */,
</span><del>-                                51AEA4C81D6E3CC100E0269D /* GameController.framework */,
</del><span class="cx">                                 1AB33DA412551E320024457A /* IOKit.framework */,
</span><span class="cx">                                 F8216299029F4FB501000131 /* JavaScriptCore.framework */,
</span><span class="cx">                                 93F1D31A0558CC5C00821BC0 /* libicucore.dylib */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgamepadcocoaGameControllerGamepadProvidermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm (205755 => 205756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm        2016-09-09 18:38:47 UTC (rev 205755)
+++ trunk/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm        2016-09-09 18:44:14 UTC (rev 205756)
</span><span class="lines">@@ -30,8 +30,14 @@
</span><span class="cx"> #import &quot;GameControllerGamepad.h&quot;
</span><span class="cx"> #import &quot;GamepadProviderClient.h&quot;
</span><span class="cx"> #import &quot;Logging.h&quot;
</span><ins>+#import &quot;SoftLinking.h&quot;
</ins><span class="cx"> #import &lt;GameController/GameController.h&gt;
</span><span class="cx"> 
</span><ins>+SOFT_LINK_FRAMEWORK_OPTIONAL(GameController)
+SOFT_LINK_CLASS_OPTIONAL(GameController, GCController);
+SOFT_LINK_CONSTANT_MAY_FAIL(GameController, GCControllerDidConnectNotification, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(GameController, GCControllerDidDisconnectNotification, NSString *)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static const std::chrono::milliseconds InputNotificationDelay = 16ms;
</span><span class="lines">@@ -98,15 +104,19 @@
</span><span class="cx">     if (m_connectObserver)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_connectObserver = [[NSNotificationCenter defaultCenter] addObserverForName:GCControllerDidConnectNotification object:nil queue:nil usingBlock:^(NSNotification *notification) {
-        GameControllerGamepadProvider::singleton().controllerDidConnect(notification.object, ConnectionVisibility::Visible);
-    }];
</del><ins>+    if (canLoadGCControllerDidConnectNotification()) {
+        m_connectObserver = [[NSNotificationCenter defaultCenter] addObserverForName:getGCControllerDidConnectNotification() object:nil queue:nil usingBlock:^(NSNotification *notification) {
+            GameControllerGamepadProvider::singleton().controllerDidConnect(notification.object, ConnectionVisibility::Visible);
+        }];
+    }
</ins><span class="cx"> 
</span><del>-    m_disconnectObserver = [[NSNotificationCenter defaultCenter] addObserverForName:GCControllerDidDisconnectNotification object:nil queue:nil usingBlock:^(NSNotification *notification) {
-        GameControllerGamepadProvider::singleton().controllerDidDisconnect(notification.object);
-    }];
</del><ins>+    if (canLoadGCControllerDidDisconnectNotification()) {
+        m_disconnectObserver = [[NSNotificationCenter defaultCenter] addObserverForName:getGCControllerDidDisconnectNotification() object:nil queue:nil usingBlock:^(NSNotification *notification) {
+            GameControllerGamepadProvider::singleton().controllerDidDisconnect(notification.object);
+        }];
+    }
</ins><span class="cx"> 
</span><del>-    for (GCController *controller in [GCController controllers])
</del><ins>+    for (GCController *controller in [getGCControllerClass() controllers])
</ins><span class="cx">         controllerDidConnect(controller, ConnectionVisibility::Invisible);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>