<!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>[197990] trunk/Source</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/197990">197990</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2016-03-10 20:50:10 -0800 (Thu, 10 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Set AVURLAssetUsesNoPersistentCacheKey on AVAsset to match caching policy.
https://bugs.webkit.org/show_bug.cgi?id=155117
rdar://problem/6802240

Patch by Jeremy Jones &lt;jeremyj@apple.com&gt; on 2016-03-10
Reviewed by Simon Fraser.

Source/WebCore:

No new tests because no new functionality was added.

This will prevent persistent media caches when webkit is using in memory caching.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache): Added.
* html/HTMLMediaElement.h: Declare mediaPlayerShouldUsePersistentCache().
* page/ChromeClient.h: Declare mediaPlayerShouldUsePersistentCache().
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerShouldUsePersistentCache): Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Set property on AVAssetOptions.

Source/WebKit/mac:

Implement mediaShouldUsePersistentCache to disable media caching when NSURLCache is disabled.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::mediaShouldUsePersistentCache): Added.

Source/WebKit2:

Make AVAsset AVURLAssetUsesNoPersistentCacheKey match !m_websiteDataStore-&gt;isPersistent()
This will prevent persistent media caches when webkit is using in-memory caching.

* Shared/WebPageCreationParameters.cpp: Add mediaShouldUsePersistentCache.
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Add mediaShouldUsePersistentCache.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mediaShouldUsePersistentCache): Added.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_mediaUsesPersistentCache): Added.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::mediaShouldUsePersistentCache): Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCorepageChromeClienth">trunk/Source/WebCore/page/ChromeClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsMediaPlayerh">trunk/Source/WebCore/platform/graphics/MediaPlayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebChromeClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebChromeClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParameterscpp">trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParametersh">trunk/Source/WebKit2/Shared/WebPageCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebCore/ChangeLog        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-03-10  Jeremy Jones  &lt;jeremyj@apple.com&gt;
+
+        Set AVURLAssetUsesNoPersistentCacheKey on AVAsset to match caching policy.
+        https://bugs.webkit.org/show_bug.cgi?id=155117
+        rdar://problem/6802240
+
+        Reviewed by Simon Fraser.
+
+        No new tests because no new functionality was added.
+
+        This will prevent persistent media caches when webkit is using in memory caching.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache): Added.
+        * html/HTMLMediaElement.h: Declare mediaPlayerShouldUsePersistentCache().
+        * page/ChromeClient.h: Declare mediaPlayerShouldUsePersistentCache().
+        * platform/graphics/MediaPlayer.h:
+        (WebCore::MediaPlayerClient::mediaPlayerShouldUsePersistentCache): Added.
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Set property on AVAssetOptions.
+
</ins><span class="cx"> 2016-03-10  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CRASH at WebCore::RenderView::updateVisibleViewportRect
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -6144,6 +6144,14 @@
</span><span class="cx">     return adoptRef(*new MediaResourceLoader(document(), fastGetAttribute(HTMLNames::crossoriginAttr)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool HTMLMediaElement::mediaPlayerShouldUsePersistentCache() const
+{
+    if (!document().page())
+        return false;
+
+    return document().page()-&gt;chrome().client().mediaShouldUsePersistentCache();
+}
+
</ins><span class="cx"> bool HTMLMediaElement::mediaPlayerShouldWaitForResponseToAuthenticationChallenge(const AuthenticationChallenge&amp; challenge)
</span><span class="cx"> {
</span><span class="cx">     Frame* frame = document().frame();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -596,6 +596,7 @@
</span><span class="cx">     bool mediaPlayerIsLooping() const override;
</span><span class="cx">     CachedResourceLoader* mediaPlayerCachedResourceLoader() override;
</span><span class="cx">     RefPtr&lt;PlatformMediaResourceLoader&gt; mediaPlayerCreateResourceLoader() override;
</span><ins>+    bool mediaPlayerShouldUsePersistentCache() const override;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN) &amp;&amp; USE(AVFOUNDATION)
</span><span class="cx">     GraphicsDeviceAdapter* mediaPlayerGraphicsDeviceAdapter(const MediaPlayer*) const override;
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ChromeClient.h (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ChromeClient.h        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebCore/page/ChromeClient.h        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -470,6 +470,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void didInvalidateDocumentMarkerRects() { }
</span><span class="cx"> 
</span><ins>+    virtual bool mediaShouldUsePersistentCache() const { return true; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     virtual ~ChromeClient() { }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsMediaPlayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.h (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/MediaPlayer.h        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.h        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -235,6 +235,7 @@
</span><span class="cx">     virtual CachedResourceLoader* mediaPlayerCachedResourceLoader() { return 0; }
</span><span class="cx">     virtual RefPtr&lt;PlatformMediaResourceLoader&gt; mediaPlayerCreateResourceLoader() { return nullptr; }
</span><span class="cx">     virtual bool doesHaveAttribute(const AtomicString&amp;, AtomicString* = 0) const { return false; }
</span><ins>+    virtual bool mediaPlayerShouldUsePersistentCache() const { return true; }
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     virtual void mediaPlayerDidAddAudioTrack(PassRefPtr&lt;AudioTrackPrivate&gt;) { }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -229,6 +229,7 @@
</span><span class="cx"> #if ENABLE(AVF_CAPTIONS)
</span><span class="cx"> SOFT_LINK_POINTER(AVFoundation, AVURLAssetHTTPCookiesKey, NSString*)
</span><span class="cx"> SOFT_LINK_POINTER(AVFoundation, AVURLAssetOutOfBandAlternateTracksKey, NSString*)
</span><ins>+SOFT_LINK_POINTER(AVFoundation, AVURLAssetUsesNoPersistentCacheKey, NSString*)
</ins><span class="cx"> SOFT_LINK_POINTER(AVFoundation, AVOutOfBandAlternateTrackDisplayNameKey, NSString*)
</span><span class="cx"> SOFT_LINK_POINTER(AVFoundation, AVOutOfBandAlternateTrackExtendedLanguageTagKey, NSString*)
</span><span class="cx"> SOFT_LINK_POINTER(AVFoundation, AVOutOfBandAlternateTrackIsDefaultKey, NSString*)
</span><span class="lines">@@ -241,6 +242,7 @@
</span><span class="cx"> 
</span><span class="cx"> #define AVURLAssetHTTPCookiesKey getAVURLAssetHTTPCookiesKey()
</span><span class="cx"> #define AVURLAssetOutOfBandAlternateTracksKey getAVURLAssetOutOfBandAlternateTracksKey()
</span><ins>+#define AVURLAssetUsesNoPersistentCacheKey getAVURLAssetUsesNoPersistentCacheKey()
</ins><span class="cx"> #define AVOutOfBandAlternateTrackDisplayNameKey getAVOutOfBandAlternateTrackDisplayNameKey()
</span><span class="cx"> #define AVOutOfBandAlternateTrackExtendedLanguageTagKey getAVOutOfBandAlternateTrackExtendedLanguageTagKey()
</span><span class="cx"> #define AVOutOfBandAlternateTrackIsDefaultKey getAVOutOfBandAlternateTrackIsDefaultKey()
</span><span class="lines">@@ -872,6 +874,8 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    [options setObject:[NSNumber numberWithBool:!player()-&gt;client().mediaPlayerShouldUsePersistentCache()] forKey:AVURLAssetUsesNoPersistentCacheKey];
+
</ins><span class="cx">     NSURL *cocoaURL = canonicalURL(url);
</span><span class="cx">     m_avAsset = adoptNS([allocAVURLAssetInstance() initWithURL:cocoaURL options:options.get()]);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-03-10  Jeremy Jones  &lt;jeremyj@apple.com&gt;
+
+        Set AVURLAssetUsesNoPersistentCacheKey on AVAsset to match caching policy.
+        https://bugs.webkit.org/show_bug.cgi?id=155117
+        rdar://problem/6802240
+
+        Reviewed by Simon Fraser.
+
+        Implement mediaShouldUsePersistentCache to disable media caching when NSURLCache is disabled.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::mediaShouldUsePersistentCache): Added.
+
</ins><span class="cx"> 2016-03-10  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Font antialiasing (smoothing) changes when elements are rendered into compositing layers
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -218,6 +218,8 @@
</span><span class="cx">     void setMockMediaPlaybackTargetPickerEnabled(bool) override;
</span><span class="cx">     void setMockMediaPlaybackTargetPickerState(const String&amp;, WebCore::MediaPlaybackTargetContext::State) override;
</span><span class="cx"> #endif
</span><ins>+    
+    bool mediaShouldUsePersistentCache() const override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WebView *m_webView;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebChromeClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -1053,3 +1053,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><ins>+
+bool WebChromeClient::mediaShouldUsePersistentCache() const
+{
+    return [[NSURLCache sharedURLCache] diskCapacity] &gt; 0;
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit2/ChangeLog        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-03-10  Jeremy Jones  &lt;jeremyj@apple.com&gt;
+
+        Set AVURLAssetUsesNoPersistentCacheKey on AVAsset to match caching policy.
+        https://bugs.webkit.org/show_bug.cgi?id=155117
+        rdar://problem/6802240
+
+        Reviewed by Simon Fraser.
+
+        Make AVAsset AVURLAssetUsesNoPersistentCacheKey match !m_websiteDataStore-&gt;isPersistent()
+        This will prevent persistent media caches when webkit is using in-memory caching.
+
+        * Shared/WebPageCreationParameters.cpp: Add mediaShouldUsePersistentCache.
+        (WebKit::WebPageCreationParameters::encode):
+        (WebKit::WebPageCreationParameters::decode):
+        * Shared/WebPageCreationParameters.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::creationParameters): Add mediaShouldUsePersistentCache.
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::mediaShouldUsePersistentCache): Added.
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_mediaUsesPersistentCache): Added.
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::mediaShouldUsePersistentCache): Added.
+
</ins><span class="cx"> 2016-03-10  Nan Wang  &lt;n_wang@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: Force allow user zoom
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx">     encoder &lt;&lt; userContentControllerID;
</span><span class="cx">     encoder &lt;&lt; visitedLinkTableID;
</span><span class="cx">     encoder &lt;&lt; websiteDataStoreID;
</span><ins>+    encoder &lt;&lt; mediaShouldUsePersistentCache;
</ins><span class="cx">     encoder &lt;&lt; canRunBeforeUnloadConfirmPanel;
</span><span class="cx">     encoder &lt;&lt; canRunModal;
</span><span class="cx">     encoder &lt;&lt; deviceScaleFactor;
</span><span class="lines">@@ -134,6 +135,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.websiteDataStoreID))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(parameters.mediaShouldUsePersistentCache))
+        return false;
</ins><span class="cx">     if (!decoder.decode(parameters.canRunBeforeUnloadConfirmPanel))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.canRunModal))
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.h (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -89,6 +89,7 @@
</span><span class="cx">     uint64_t userContentControllerID;
</span><span class="cx">     uint64_t visitedLinkTableID;
</span><span class="cx">     uint64_t websiteDataStoreID;
</span><ins>+    bool mediaShouldUsePersistentCache;
</ins><span class="cx">     bool canRunBeforeUnloadConfirmPanel;
</span><span class="cx">     bool canRunModal;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -5167,6 +5167,7 @@
</span><span class="cx">     parameters.userContentControllerID = m_userContentController-&gt;identifier();
</span><span class="cx">     parameters.visitedLinkTableID = m_visitedLinkStore-&gt;identifier();
</span><span class="cx">     parameters.websiteDataStoreID = m_websiteDataStore-&gt;identifier();
</span><ins>+    parameters.mediaShouldUsePersistentCache = m_websiteDataStore-&gt;isPersistent();
</ins><span class="cx">     parameters.canRunBeforeUnloadConfirmPanel = m_uiClient-&gt;canRunBeforeUnloadConfirmPanel();
</span><span class="cx">     parameters.canRunModal = m_canRunModal;
</span><span class="cx">     parameters.deviceScaleFactor = deviceScaleFactor();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -1146,5 +1146,10 @@
</span><span class="cx"> {
</span><span class="cx">     m_page-&gt;findController().didInvalidateDocumentMarkerRects();
</span><span class="cx"> }
</span><ins>+    
+bool WebChromeClient::mediaShouldUsePersistentCache() const
+{
+    return m_page-&gt;mediaShouldUsePersistentCache();
+}
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -335,6 +335,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void didInvalidateDocumentMarkerRects() override;
</span><ins>+    bool mediaShouldUsePersistentCache() const override;
</ins><span class="cx"> 
</span><span class="cx">     String m_cachedToolTip;
</span><span class="cx">     mutable RefPtr&lt;WebFrame&gt; m_cachedFrameSetLargestFrame;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -365,6 +365,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_mainFrameProgressCompleted(false)
</span><span class="cx">     , m_shouldDispatchFakeMouseMoveEvents(true)
</span><ins>+    , m_mediaShouldUsePersistentCache(parameters.mediaShouldUsePersistentCache)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_pageID);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (197989 => 197990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-03-11 04:25:51 UTC (rev 197989)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-03-11 04:50:10 UTC (rev 197990)
</span><span class="lines">@@ -931,6 +931,8 @@
</span><span class="cx"> 
</span><span class="cx">     void didRestoreScrollPosition();
</span><span class="cx"> 
</span><ins>+    bool mediaShouldUsePersistentCache() const { return m_mediaShouldUsePersistentCache; }
+
</ins><span class="cx">     bool isControlledByAutomation() const;
</span><span class="cx">     void setControlledByAutomation(bool);
</span><span class="cx"> 
</span><span class="lines">@@ -1453,6 +1455,8 @@
</span><span class="cx"> #if USE(OS_STATE)
</span><span class="cx">     std::chrono::system_clock::time_point m_loadCommitTime;
</span><span class="cx"> #endif
</span><ins>+
+    bool m_mediaShouldUsePersistentCache;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>