Title: [184741] trunk/Source
Revision
184741
Author
beid...@apple.com
Date
2015-05-21 17:35:53 -0700 (Thu, 21 May 2015)

Log Message

Add an "initiated by user gesture" flag to ResourceRequest.
https://bugs.webkit.org/show_bug.cgi?id=145281

Reviewed by Alex Christensen.

Source/WebCore:

Allow WebKit to tell WebCore what the new property key is:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Add the flag to ResourceRequest, and make sure it encodes/decodes:
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::initiatedByUserGesture):
(WebCore::ResourceRequestBase::setInitiatedByUserGesture):
(WebCore::ResourceRequestBase::encodeWithoutPlatformData):
(WebCore::ResourceRequestBase::decodeWithoutPlatformData):

Set/get the property on native CFURLRequestRefs:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):

Set/get the property on native NSURLRequests:
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(WKResourceRequestIsUserInitiatedKey):
(InitWebCoreSystemInterface):

Source/WebKit2:

Expose a new category on NSURLRequest to allow SPI clients to easily set/get the flag:
* Shared/API/Cocoa/_WKNSURLRequestExtras.h: Added.
* Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Added.
(-[NSURLRequest _web_isUserInitiated]):
(-[NSMutableURLRequest _web_setIsUserInitiated:]):

* WebKit2.xcodeproj/project.pbxproj:

Expose the new property key to WebCore:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(WKResourceRequestIsUserInitiatedKey):
(InitWebCoreSystemInterface):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184740 => 184741)


--- trunk/Source/WebCore/ChangeLog	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebCore/ChangeLog	2015-05-22 00:35:53 UTC (rev 184741)
@@ -1,3 +1,32 @@
+2015-05-21  Brady Eidson  <beid...@apple.com>
+
+        Add an "initiated by user gesture" flag to ResourceRequest.
+        https://bugs.webkit.org/show_bug.cgi?id=145281
+
+        Reviewed by Alex Christensen.
+
+        Allow WebKit to tell WebCore what the new property key is:
+        * platform/ios/WebCoreSystemInterfaceIOS.mm:
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+
+        Add the flag to ResourceRequest, and make sure it encodes/decodes:
+        * platform/network/ResourceRequestBase.h:
+        (WebCore::ResourceRequestBase::initiatedByUserGesture):
+        (WebCore::ResourceRequestBase::setInitiatedByUserGesture):
+        (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
+        (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
+
+        Set/get the property on native CFURLRequestRefs:
+        * platform/network/cf/ResourceRequestCFNet.cpp:
+        (WebCore::ResourceRequest::doUpdatePlatformRequest):
+        (WebCore::ResourceRequest::doUpdateResourceRequest):
+
+        Set/get the property on native NSURLRequests:
+        * platform/network/cocoa/ResourceRequestCocoa.mm:
+        (WebCore::ResourceRequest::doUpdateResourceRequest):
+        (WebCore::ResourceRequest::doUpdatePlatformRequest):
+
 2015-05-21  Daniel Bates  <daba...@apple.com>
 
         Rollout <http://trac.webkit.org/changeset/183909>

Modified: trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm (184740 => 184741)


--- trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm	2015-05-22 00:35:53 UTC (rev 184741)
@@ -124,3 +124,5 @@
 
 WEBCORE_EXPORT bool (*wkQueryDecoderAvailability)(void);
 
+WEBCORE_EXPORT CFStringRef (*wkResourceRequestIsUserInitiatedKey)(void);
+

Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (184740 => 184741)


--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h	2015-05-22 00:35:53 UTC (rev 184741)
@@ -318,6 +318,8 @@
 extern CFStringRef (*wkCachePartitionKey)(void);
 #endif
 
+extern CFStringRef (*wkResourceRequestIsUserInitiatedKey)(void);
+
 typedef enum {
     wkExternalPlaybackTypeNone,
     wkExternalPlaybackTypeAirPlay,

Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (184740 => 184741)


--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm	2015-05-22 00:35:53 UTC (rev 184741)
@@ -170,6 +170,8 @@
 CFStringRef (*wkCachePartitionKey)(void);
 #endif
 
+CFStringRef (*wkResourceRequestIsUserInitiatedKey)(void);
+
 int (*wkExernalDeviceTypeForPlayer)(AVPlayer *);
 NSString *(*wkExernalDeviceDisplayNameForPlayer)(AVPlayer *);
 

Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.h (184740 => 184741)


--- trunk/Source/WebCore/platform/network/ResourceRequestBase.h	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.h	2015-05-22 00:35:53 UTC (rev 184741)
@@ -147,6 +147,9 @@
         bool hiddenFromInspector() const { return m_hiddenFromInspector; }
         void setHiddenFromInspector(bool hiddenFromInspector) { m_hiddenFromInspector = hiddenFromInspector; }
 
+        bool initiatedByUserGesture() const { return m_initiatedByUserGesture; }
+        void setInitiatedByUserGesture(bool initiatedByUserGesture) { m_initiatedByUserGesture = initiatedByUserGesture; }
+
         enum class Requester { Unspecified, Main, XHR };
         Requester requester() const { return m_requester; }
         void setRequester(Requester requester) { m_requester = requester; }
@@ -213,6 +216,7 @@
         bool m_reportLoadTiming { false };
         bool m_reportRawHeaders { false };
         bool m_hiddenFromInspector { false };
+        bool m_initiatedByUserGesture { false };
         ResourceLoadPriority m_priority { ResourceLoadPriority::Low };
         Requester m_requester { Requester::Unspecified };
 
@@ -264,6 +268,7 @@
     encoder << m_allowCookies;
     encoder.encodeEnum(m_priority);
     encoder.encodeEnum(m_requester);
+    encoder << m_initiatedByUserGesture;
 }
 
 template<class Decoder>
@@ -309,6 +314,9 @@
     if (!decoder.decodeEnum(m_requester))
         return false;
 
+    if (!decoder.decode(m_initiatedByUserGesture))
+        return false;
+
     return true;
 }
 

Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp (184740 => 184741)


--- trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp	2015-05-22 00:35:53 UTC (rev 184741)
@@ -186,6 +186,11 @@
     }
 #endif
 
+#if !PLATFORM(WIN)
+    if (initiatedByUserGesture())
+        _CFURLRequestSetProtocolProperty(cfRequest, wkResourceRequestIsUserInitiatedKey(), kCFBooleanTrue);
+#endif
+
     m_cfRequest = adoptCF(cfRequest);
 #if PLATFORM(COCOA)
     clearOrUpdateNSURLRequest();
@@ -290,6 +295,12 @@
     if (cachePartition)
         m_cachePartition = cachePartition.get();
 #endif
+
+#if !PLATFORM(WIN)
+    RetainPtr<CFBooleanRef> initiatedByUserGesture = adoptCF(static_cast<CFBooleanRef>(_CFURLRequestCopyProtocolPropertyForKey(m_cfRequest.get(), wkResourceRequestIsUserInitiatedKey())));
+    if (initiatedByUserGesture)
+        setInitiatedByUserGesture(CFBooleanGetValue(initiatedByUserGesture.get()));
+#endif
 }
 
 void ResourceRequest::doUpdateResourceHTTPBody()

Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm (184740 => 184741)


--- trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm	2015-05-22 00:35:53 UTC (rev 184741)
@@ -102,6 +102,10 @@
             m_cachePartition = cachePartition;
     }
 #endif
+
+    NSNumber *initiatedByUserGesture = [NSURLProtocol propertyForKey:(NSString *)wkResourceRequestIsUserInitiatedKey() inRequest:m_nsRequest.get()];
+    if (initiatedByUserGesture)
+        setInitiatedByUserGesture(initiatedByUserGesture.boolValue);
 }
 
 void ResourceRequest::doUpdateResourceHTTPBody()
@@ -178,6 +182,9 @@
         [NSURLProtocol setProperty:partitionValue forKey:(NSString *)wkCachePartitionKey() inRequest:nsRequest];
     }
 #endif
+
+    if (initiatedByUserGesture())
+        [NSURLProtocol setProperty:@YES forKey:(NSString *)wkResourceRequestIsUserInitiatedKey() inRequest:nsRequest];
 }
 
 void ResourceRequest::doUpdatePlatformHTTPBody()

Modified: trunk/Source/WebKit/mac/ChangeLog (184740 => 184741)


--- trunk/Source/WebKit/mac/ChangeLog	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-05-22 00:35:53 UTC (rev 184741)
@@ -1,3 +1,14 @@
+2015-05-21  Brady Eidson  <beid...@apple.com>
+
+        Add an "initiated by user gesture" flag to ResourceRequest.
+        https://bugs.webkit.org/show_bug.cgi?id=145281
+
+        Reviewed by Alex Christensen.
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (WKResourceRequestIsUserInitiatedKey):
+        (InitWebCoreSystemInterface):
+
 2015-05-20  Anders Carlsson  <ander...@apple.com>
 
         Fix build.

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (184740 => 184741)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm	2015-05-22 00:35:53 UTC (rev 184741)
@@ -36,6 +36,12 @@
 
 #define INIT(function) wk##function = WK##function
 
+static CFStringRef WKResourceRequestIsUserInitiatedKey()
+{
+    static CFStringRef key = CFSTR("WKResourceRequestIsUserInitiatedKey");
+    return key;
+}
+
 void InitWebCoreSystemInterface(void)
 {
     static bool didInit;
@@ -210,6 +216,7 @@
     INIT(CachePartitionKey);
 #endif
 
+    INIT(ResourceRequestIsUserInitiatedKey);
     INIT(ExernalDeviceTypeForPlayer);
     INIT(ExernalDeviceDisplayNameForPlayer);
 

Modified: trunk/Source/WebKit2/ChangeLog (184740 => 184741)


--- trunk/Source/WebKit2/ChangeLog	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-22 00:35:53 UTC (rev 184741)
@@ -1,3 +1,23 @@
+2015-05-21  Brady Eidson  <beid...@apple.com>
+
+        Add an "initiated by user gesture" flag to ResourceRequest.
+        https://bugs.webkit.org/show_bug.cgi?id=145281
+
+        Reviewed by Alex Christensen.
+
+        Expose a new category on NSURLRequest to allow SPI clients to easily set/get the flag:
+        * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Added.
+        * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Added.
+        (-[NSURLRequest _web_isUserInitiated]):
+        (-[NSMutableURLRequest _web_setIsUserInitiated:]):
+
+        * WebKit2.xcodeproj/project.pbxproj:
+
+        Expose the new property key to WebCore:
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (WKResourceRequestIsUserInitiatedKey):
+        (InitWebCoreSystemInterface):
+
 2015-05-21  Daniel Bates  <daba...@apple.com>
 
         Rollout <http://trac.webkit.org/changeset/183909>

Added: trunk/Source/WebKit2/Shared/API/Cocoa/_WKNSURLRequestExtras.h (0 => 184741)


--- trunk/Source/WebKit2/Shared/API/Cocoa/_WKNSURLRequestExtras.h	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/_WKNSURLRequestExtras.h	2015-05-22 00:35:53 UTC (rev 184741)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2015 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 <WebKit/WKFoundation.h>
+
+@interface NSURLRequest (WKExtras)
+
+- (BOOL)_web_isUserInitiated;
+
+@end
+
+@interface NSMutableURLRequest (WKExtras)
+
+- (void)_web_setIsUserInitiated:(BOOL)userInitiated;
+
+@end

Added: trunk/Source/WebKit2/Shared/API/Cocoa/_WKNSURLRequestExtras.mm (0 => 184741)


--- trunk/Source/WebKit2/Shared/API/Cocoa/_WKNSURLRequestExtras.mm	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/_WKNSURLRequestExtras.mm	2015-05-22 00:35:53 UTC (rev 184741)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2015 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 "_WKNSURLRequestExtras.h"
+
+#import <WebCore/WebCoreSystemInterface.h>
+
+@implementation NSURLRequest (WKExtras)
+
+- (BOOL)_web_isUserInitiated
+{
+    NSNumber *userInitiated = [NSURLProtocol propertyForKey:(NSString *)wkResourceRequestIsUserInitiatedKey() inRequest:self];
+    return userInitiated.boolValue;
+}
+
+@end
+
+@implementation NSMutableURLRequest (WKExtras)
+
+- (void)_web_setIsUserInitiated:(BOOL)userInitiated
+{
+    [NSURLProtocol setProperty:userInitiated ? @YES : @NO forKey:(NSString *)wkResourceRequestIsUserInitiatedKey() inRequest:self];
+}
+
+@end

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (184740 => 184741)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2015-05-22 00:35:53 UTC (rev 184741)
@@ -1014,6 +1014,8 @@
 		51AD35731AD2F3940057B38E /* WebHitTestResult.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51AD35721AD2F3750057B38E /* WebHitTestResult.mm */; };
 		51B15A8413843A3900321AD8 /* EnvironmentUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51B15A8213843A3900321AD8 /* EnvironmentUtilities.cpp */; };
 		51B15A8513843A3900321AD8 /* EnvironmentUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B15A8313843A3900321AD8 /* EnvironmentUtilities.h */; };
+		51B8F4831B0E539A008FC4BD /* _WKNSURLRequestExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B8F47F1B0E530C008FC4BD /* _WKNSURLRequestExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		51B8F4841B0E53A1008FC4BD /* _WKNSURLRequestExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B8F4801B0E530C008FC4BD /* _WKNSURLRequestExtras.mm */; };
 		51BA24441858EE3000EA2811 /* AsyncTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BA24431858EE3000EA2811 /* AsyncTask.h */; };
 		51BA24461858F55D00EA2811 /* WebCrossThreadCopier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51BA24451858F41500EA2811 /* WebCrossThreadCopier.cpp */; };
 		51C96118183D294700D2002E /* WebIDBServerConnectionMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51C96116183D294700D2002E /* WebIDBServerConnectionMessageReceiver.cpp */; };
@@ -3219,6 +3221,8 @@
 		51AD35721AD2F3750057B38E /* WebHitTestResult.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebHitTestResult.mm; sourceTree = "<group>"; };
 		51B15A8213843A3900321AD8 /* EnvironmentUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EnvironmentUtilities.cpp; path = unix/EnvironmentUtilities.cpp; sourceTree = "<group>"; };
 		51B15A8313843A3900321AD8 /* EnvironmentUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EnvironmentUtilities.h; path = unix/EnvironmentUtilities.h; sourceTree = "<group>"; };
+		51B8F47F1B0E530C008FC4BD /* _WKNSURLRequestExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKNSURLRequestExtras.h; sourceTree = "<group>"; };
+		51B8F4801B0E530C008FC4BD /* _WKNSURLRequestExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKNSURLRequestExtras.mm; sourceTree = "<group>"; };
 		51BA24431858EE3000EA2811 /* AsyncTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncTask.h; sourceTree = "<group>"; };
 		51BA24451858F41500EA2811 /* WebCrossThreadCopier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebCrossThreadCopier.cpp; sourceTree = "<group>"; };
 		51C96115183C95FF00D2002E /* WebIDBServerConnection.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebIDBServerConnection.messages.in; sourceTree = "<group>"; };
@@ -5504,6 +5508,8 @@
 				373D122618A473F60066D9CC /* _WKFrameHandleInternal.h */,
 				A118A9F11908B8EA00F7C92B /* _WKNSFileManagerExtras.h */,
 				A118A9F01908B8EA00F7C92B /* _WKNSFileManagerExtras.mm */,
+				51B8F47F1B0E530C008FC4BD /* _WKNSURLRequestExtras.h */,
+				51B8F4801B0E530C008FC4BD /* _WKNSURLRequestExtras.mm */,
 				1A9E328B182165A900F5D04C /* _WKRemoteObjectInterface.h */,
 				1A9E328C182165A900F5D04C /* _WKRemoteObjectInterface.mm */,
 				1AABFE391829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h */,
@@ -7829,6 +7835,7 @@
 				1A4A9C5612B816CF008FE984 /* NetscapePluginModule.h in Headers */,
 				1AA5889211EE70400061B882 /* NetscapePluginStream.h in Headers */,
 				E1798C7A16E6818800240139 /* NetworkBlobRegistry.h in Headers */,
+				51B8F4831B0E539A008FC4BD /* _WKNSURLRequestExtras.h in Headers */,
 				E4436ECC1A0D040B00EAD204 /* NetworkCache.h in Headers */,
 				E49D40D71AD3FB170066B7B9 /* NetworkCacheBlobStorage.h in Headers */,
 				E489D28A1A0A2DB80078C06A /* NetworkCacheCoder.h in Headers */,
@@ -9569,6 +9576,7 @@
 				1A1D8BA11731A36300141DA4 /* LocalStorageDatabase.cpp in Sources */,
 				1A8C728C1738477C000A6554 /* LocalStorageDatabaseTracker.cpp in Sources */,
 				51A7F2F5125BF8D4008AEB1D /* Logging.cpp in Sources */,
+				51B8F4841B0E53A1008FC4BD /* _WKNSURLRequestExtras.mm in Sources */,
 				5160BFE113381DF900918999 /* LoggingFoundation.mm in Sources */,
 				1A24B5F211F531E800C38269 /* MachUtilities.cpp in Sources */,
 				51933DF01965EB31008AC3EA /* MenuUtilities.mm in Sources */,

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (184740 => 184741)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm	2015-05-22 00:34:12 UTC (rev 184740)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm	2015-05-22 00:35:53 UTC (rev 184741)
@@ -31,6 +31,12 @@
 
 #define INIT(function) wk##function = WK##function
 
+static CFStringRef WKResourceRequestIsUserInitiatedKey()
+{
+    static CFStringRef key = CFSTR("WKResourceRequestIsUserInitiatedKey");
+    return key;
+}
+
 void InitWebCoreSystemInterface(void)
 {
     static dispatch_once_t initOnce;
@@ -201,7 +207,8 @@
 #if ENABLE(CACHE_PARTITIONING)
         INIT(CachePartitionKey);
 #endif
-        
+
+        INIT(ResourceRequestIsUserInitiatedKey);
         INIT(ExernalDeviceTypeForPlayer);
         INIT(ExernalDeviceDisplayNameForPlayer);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to