Diff
Modified: trunk/Source/WebCore/ChangeLog (168511 => 168512)
--- trunk/Source/WebCore/ChangeLog 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebCore/ChangeLog 2014-05-09 01:06:28 UTC (rev 168512)
@@ -1,5 +1,26 @@
2014-05-08 Jer Noble <jer.no...@apple.com>
+ [Mac, iOS] Add source application accounting to AVURLAsset.
+ https://bugs.webkit.org/show_bug.cgi?id=132637
+
+ Reviewed by Eric Carlson.
+
+ Properly account for the application responisble for data loading by passing the source
+ application identifier through to AVFoundation through AVURLAsset options.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseAttribute):
+ * html/HTMLMediaElement.h:
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::sourceApplicationIdentifier):
+ * platform/graphics/MediaPlayer.h:
+ (WebCore::MediaPlayerClient::mediaPlayerSourceApplicationIdentifier):
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
+ * platform/network/NetworkingContext.h:
+
+2014-05-08 Jer Noble <jer.no...@apple.com>
+
[MSE][Mac] Move AVStreamDataParser off-main-thread.
https://bugs.webkit.org/show_bug.cgi?id=132698
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (168511 => 168512)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-05-09 01:06:28 UTC (rev 168512)
@@ -62,6 +62,7 @@
#include "MediaList.h"
#include "MediaQueryEvaluator.h"
#include "MediaSessionManager.h"
+#include "NetworkingContext.h"
#include "PageActivityAssertionToken.h"
#include "PageGroup.h"
#include "PageThrottler.h"
@@ -5628,6 +5629,15 @@
return true;
}
+String HTMLMediaElement::mediaPlayerSourceApplicationIdentifier() const
+{
+ if (Frame* frame = document().frame()) {
+ if (NetworkingContext* networkingContext = frame->loader().networkingContext())
+ return networkingContext->sourceApplicationIdentifier();
+ }
+ return emptyString();
+}
+
void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture()
{
m_mediaSession->removeBehaviorRestriction(HTMLMediaSession::RequireUserGestureForLoad);
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (168511 => 168512)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2014-05-09 01:06:28 UTC (rev 168512)
@@ -566,6 +566,7 @@
virtual bool mediaPlayerShouldWaitForResponseToAuthenticationChallenge(const AuthenticationChallenge&) override;
virtual void mediaPlayerHandlePlaybackCommand(MediaSession::RemoteControlCommandType command) override { didReceiveRemoteControlCommand(command); }
+ virtual String mediaPlayerSourceApplicationIdentifier() const;
void loadTimerFired(Timer<HTMLMediaElement>&);
void progressEventTimerFired(Timer<HTMLMediaElement>&);
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (168511 => 168512)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2014-05-09 01:06:28 UTC (rev 168512)
@@ -1389,6 +1389,14 @@
m_mediaPlayerClient->mediaPlayerHandlePlaybackCommand(command);
}
+String MediaPlayer::sourceApplicationIdentifier() const
+{
+ if (!m_mediaPlayerClient)
+ return emptyString();
+
+ return m_mediaPlayerClient->mediaPlayerSourceApplicationIdentifier();
+}
+
void MediaPlayerFactorySupport::callRegisterMediaEngine(MediaEngineRegister registerMediaEngine)
{
registerMediaEngine(addMediaEngine);
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.h (168511 => 168512)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.h 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.h 2014-05-09 01:06:28 UTC (rev 168512)
@@ -264,6 +264,8 @@
virtual bool mediaPlayerShouldWaitForResponseToAuthenticationChallenge(const AuthenticationChallenge&) { return false; }
virtual void mediaPlayerHandlePlaybackCommand(MediaSession::RemoteControlCommandType) { }
+
+ virtual String mediaPlayerSourceApplicationIdentifier() const { return emptyString(); }
};
class MediaPlayerSupportsTypeClient {
@@ -575,6 +577,7 @@
bool shouldWaitForResponseToAuthenticationChallenge(const AuthenticationChallenge&);
void handlePlaybackCommand(MediaSession::RemoteControlCommandType);
+ String sourceApplicationIdentifier() const;
private:
MediaPlayer(MediaPlayerClient*);
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (168511 => 168512)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-05-09 01:06:28 UTC (rev 168512)
@@ -158,6 +158,8 @@
SOFT_LINK_POINTER(AVFoundation, AVLayerVideoGravityResize, NSString *)
SOFT_LINK_POINTER(CoreVideo, kCVPixelBufferPixelFormatTypeKey, NSString *)
+SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVURLAssetClientBundleIdentifierKey, NSString *)
+
SOFT_LINK_CONSTANT(CoreMedia, kCMTimeZero, CMTime)
#define AVPlayer getAVPlayerClass()
@@ -175,6 +177,7 @@
#define AVMediaTypeMetadata getAVMediaTypeMetadata()
#define AVPlayerItemDidPlayToEndTimeNotification getAVPlayerItemDidPlayToEndTimeNotification()
#define AVURLAssetInheritURIQueryComponentFromReferencingURIKey getAVURLAssetInheritURIQueryComponentFromReferencingURIKey()
+#define AVURLAssetClientBundleIdentifierKey getAVURLAssetClientBundleIdentifierKey()
#define AVAssetImageGeneratorApertureModeCleanAperture getAVAssetImageGeneratorApertureModeCleanAperture()
#define AVURLAssetReferenceRestrictionsKey getAVURLAssetReferenceRestrictionsKey()
#define AVLayerVideoGravityResizeAspect getAVLayerVideoGravityResizeAspect()
@@ -660,6 +663,10 @@
if (player()->doesHaveAttribute("x-itunes-inherit-uri-query-component"))
[options.get() setObject: [NSNumber numberWithBool: TRUE] forKey: AVURLAssetInheritURIQueryComponentFromReferencingURIKey];
+ String identifier = player()->sourceApplicationIdentifier();
+ if (!identifier.isEmpty() && AVURLAssetClientBundleIdentifierKey)
+ [options setObject:identifier forKey:AVURLAssetClientBundleIdentifierKey];
+
#if ENABLE(AVF_CAPTIONS)
const Vector<RefPtr<PlatformTextTrack>>& outOfBandTrackSources = player()->outOfBandTrackSources();
if (!outOfBandTrackSources.isEmpty()) {
Modified: trunk/Source/WebCore/platform/network/NetworkingContext.h (168511 => 168512)
--- trunk/Source/WebCore/platform/network/NetworkingContext.h 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebCore/platform/network/NetworkingContext.h 2014-05-09 01:06:28 UTC (rev 168512)
@@ -57,6 +57,8 @@
virtual ResourceError blockedError(const ResourceRequest&) const = 0;
#endif
+ virtual String sourceApplicationIdentifier() const { return emptyString(); }
+
#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(SOUP)
virtual NetworkStorageSession& storageSession() const = 0;
#endif
Modified: trunk/Source/WebKit/mac/ChangeLog (168511 => 168512)
--- trunk/Source/WebKit/mac/ChangeLog 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-05-09 01:06:28 UTC (rev 168512)
@@ -1,3 +1,16 @@
+2014-05-08 Jer Noble <jer.no...@apple.com>
+
+ [Mac, iOS] Add source application accounting to AVURLAsset.
+ https://bugs.webkit.org/show_bug.cgi?id=132637
+
+ Reviewed by Eric Carlson.
+
+ Add accessor for sourceApplicationIdentifier.
+
+ * WebCoreSupport/WebFrameNetworkingContext.h:
+ * WebCoreSupport/WebFrameNetworkingContext.mm:
+ (WebFrameNetworkingContext::sourceApplicationIdentifier):
+
2014-05-08 Anders Carlsson <ander...@apple.com>
Use a different install name for WebKitLegacy.framework for staged framework builds
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.h (168511 => 168512)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.h 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.h 2014-05-09 01:06:28 UTC (rev 168512)
@@ -55,6 +55,7 @@
virtual bool localFileContentSniffingEnabled() const override;
virtual SchedulePairHashSet* scheduledRunLoopPairs() const override;
virtual RetainPtr<CFDataRef> sourceApplicationAuditData() const override;
+ virtual String sourceApplicationIdentifier() const override;
virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
virtual WebCore::NetworkStorageSession& storageSession() const override;
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm (168511 => 168512)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm 2014-05-09 01:06:28 UTC (rev 168512)
@@ -104,6 +104,11 @@
return reinterpret_cast<CFDataRef>(webview._sourceApplicationAuditData);
}
+String WebFrameNetworkingContext::sourceApplicationIdentifier() const
+{
+ return [[NSBundle mainBundle] bundleIdentifier];
+}
+
ResourceError WebFrameNetworkingContext::blockedError(const ResourceRequest& request) const
{
return frame()->loader().client().blockedError(request);
Modified: trunk/Source/WebKit2/ChangeLog (168511 => 168512)
--- trunk/Source/WebKit2/ChangeLog 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebKit2/ChangeLog 2014-05-09 01:06:28 UTC (rev 168512)
@@ -1,3 +1,19 @@
+2014-05-08 Jer Noble <jer.no...@apple.com>
+
+ [Mac, iOS] Add source application accounting to AVURLAsset.
+ https://bugs.webkit.org/show_bug.cgi?id=132637
+
+ Reviewed by Eric Carlson.
+
+ Add accessor for sourceApplicationIdentifier.
+
+ * NetworkProcess/RemoteNetworkingContext.h:
+ * NetworkProcess/mac/RemoteNetworkingContext.mm:
+ (WebKit::RemoteNetworkingContext::sourceApplicationIdentifier):
+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
+ (WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier):
+
2014-05-08 Tim Horton <timothy_hor...@apple.com>
[iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
Modified: trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h (168511 => 168512)
--- trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h 2014-05-09 01:06:28 UTC (rev 168512)
@@ -64,6 +64,7 @@
void setLocalFileContentSniffingEnabled(bool value) { m_localFileContentSniffingEnabled = value; }
virtual bool localFileContentSniffingEnabled() const override;
virtual RetainPtr<CFDataRef> sourceApplicationAuditData() const override;
+ virtual String sourceApplicationIdentifier() const override;
virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
#endif
Modified: trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm (168511 => 168512)
--- trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm 2014-05-09 01:06:28 UTC (rev 168512)
@@ -80,6 +80,11 @@
#endif
}
+String RemoteNetworkingContext::sourceApplicationIdentifier() const
+{
+ return SessionTracker::getIdentifierBase();
+}
+
ResourceError RemoteNetworkingContext::blockedError(const ResourceRequest& request) const
{
return WebKit::blockedError(request);
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (168511 => 168512)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h 2014-05-09 01:06:28 UTC (rev 168512)
@@ -57,6 +57,7 @@
virtual bool localFileContentSniffingEnabled() const override;
virtual SchedulePairHashSet* scheduledRunLoopPairs() const override;
virtual RetainPtr<CFDataRef> sourceApplicationAuditData() const override;
+ virtual String sourceApplicationIdentifier() const override;
virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
virtual WebCore::NetworkStorageSession& storageSession() const override;
};
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (168511 => 168512)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm 2014-05-09 00:30:50 UTC (rev 168511)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm 2014-05-09 01:06:28 UTC (rev 168512)
@@ -101,6 +101,11 @@
#endif
}
+String WebFrameNetworkingContext::sourceApplicationIdentifier() const
+{
+ return SessionTracker::getIdentifierBase();
+}
+
ResourceError WebFrameNetworkingContext::blockedError(const ResourceRequest& request) const
{
return frame()->loader().client().blockedError(request);