Title: [198901] trunk/Source
Revision
198901
Author
[email protected]
Date
2016-03-31 11:24:24 -0700 (Thu, 31 Mar 2016)

Log Message

mediaShouldUsePersistentCache() is redundant. Use Page::usesEphemeralSession() instead.
https://bugs.webkit.org/show_bug.cgi?id=155924

Patch by Jeremy Jones <[email protected]> on 2016-03-31
Reviewed by Simon Fraser.

Source/WebCore:

No new tests because there is no behavior change.

Remove machinery for mediaShouldUsePersistentCache() adopt usesEphemeralSession().

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache):
* page/ChromeClient.h: remove mediaShouldUsePersistentCache()

Source/WebKit/mac:

Remove mediaShouldUsePersistentCache machinery as it is redundant.

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

Source/WebKit2:

Remove machinery for mediaShouldUsePersistentCache as it is redundant.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Deleted.
(WebKit::WebPageCreationParameters::decode): Deleted.
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mediaShouldUsePersistentCache): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_mediaShouldUsePersistentCache): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::mediaShouldUsePersistentCache): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (198900 => 198901)


--- trunk/Source/WebCore/ChangeLog	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebCore/ChangeLog	2016-03-31 18:24:24 UTC (rev 198901)
@@ -1,3 +1,18 @@
+2016-03-31  Jeremy Jones  <[email protected]>
+
+        mediaShouldUsePersistentCache() is redundant. Use Page::usesEphemeralSession() instead.
+        https://bugs.webkit.org/show_bug.cgi?id=155924
+
+        Reviewed by Simon Fraser.
+
+        No new tests because there is no behavior change.
+
+        Remove machinery for mediaShouldUsePersistentCache() adopt usesEphemeralSession().
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache):
+        * page/ChromeClient.h: remove mediaShouldUsePersistentCache()
+
 2016-03-30  Ada Chan  <[email protected]>
 
         Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms.

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (198900 => 198901)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-03-31 18:24:24 UTC (rev 198901)
@@ -6187,10 +6187,10 @@
 
 bool HTMLMediaElement::mediaPlayerShouldUsePersistentCache() const
 {
-    if (!document().page())
-        return false;
+    if (Page* page = document().page())
+        return !page->usesEphemeralSession() && !page->isResourceCachingDisabled();
 
-    return document().page()->chrome().client().mediaShouldUsePersistentCache();
+    return false;
 }
 
 bool HTMLMediaElement::mediaPlayerShouldWaitForResponseToAuthenticationChallenge(const AuthenticationChallenge& challenge)

Modified: trunk/Source/WebCore/page/ChromeClient.h (198900 => 198901)


--- trunk/Source/WebCore/page/ChromeClient.h	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebCore/page/ChromeClient.h	2016-03-31 18:24:24 UTC (rev 198901)
@@ -470,8 +470,6 @@
 
     virtual void didInvalidateDocumentMarkerRects() { }
 
-    virtual bool mediaShouldUsePersistentCache() const { return true; }
-
 protected:
     virtual ~ChromeClient() { }
 };

Modified: trunk/Source/WebKit/mac/ChangeLog (198900 => 198901)


--- trunk/Source/WebKit/mac/ChangeLog	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-03-31 18:24:24 UTC (rev 198901)
@@ -1,3 +1,16 @@
+2016-03-31  Jeremy Jones  <[email protected]>
+
+        mediaShouldUsePersistentCache() is redundant. Use Page::usesEphemeralSession() instead.
+        https://bugs.webkit.org/show_bug.cgi?id=155924
+
+        Reviewed by Simon Fraser.
+
+        Remove mediaShouldUsePersistentCache machinery as it is redundant.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::mediaShouldUsePersistentCache): Deleted.
+
 2016-03-30  Ada Chan  <[email protected]>
 
         Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms.

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h (198900 => 198901)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h	2016-03-31 18:24:24 UTC (rev 198901)
@@ -218,8 +218,6 @@
     void setMockMediaPlaybackTargetPickerEnabled(bool) override;
     void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State) override;
 #endif
-    
-    bool mediaShouldUsePersistentCache() const override;
 
 private:
     WebView *m_webView;

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm (198900 => 198901)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm	2016-03-31 18:24:24 UTC (rev 198901)
@@ -1053,8 +1053,3 @@
 }
 
 #endif
-
-bool WebChromeClient::mediaShouldUsePersistentCache() const
-{
-    return [[NSURLCache sharedURLCache] diskCapacity] > 0;
-}

Modified: trunk/Source/WebKit2/ChangeLog (198900 => 198901)


--- trunk/Source/WebKit2/ChangeLog	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit2/ChangeLog	2016-03-31 18:24:24 UTC (rev 198901)
@@ -1,3 +1,26 @@
+2016-03-31  Jeremy Jones  <[email protected]>
+
+        mediaShouldUsePersistentCache() is redundant. Use Page::usesEphemeralSession() instead.
+        https://bugs.webkit.org/show_bug.cgi?id=155924
+
+        Reviewed by Simon Fraser.
+
+        Remove machinery for mediaShouldUsePersistentCache as it is redundant.
+
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode): Deleted.
+        (WebKit::WebPageCreationParameters::decode): Deleted.
+        * Shared/WebPageCreationParameters.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::creationParameters): Deleted.
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::mediaShouldUsePersistentCache): Deleted.
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_mediaShouldUsePersistentCache): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::mediaShouldUsePersistentCache): Deleted.
+
 2016-03-30  Ada Chan  <[email protected]>
 
         Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms.

Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp (198900 => 198901)


--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp	2016-03-31 18:24:24 UTC (rev 198901)
@@ -55,7 +55,6 @@
     encoder << userContentControllerID;
     encoder << visitedLinkTableID;
     encoder << websiteDataStoreID;
-    encoder << mediaShouldUsePersistentCache;
     encoder << canRunBeforeUnloadConfirmPanel;
     encoder << canRunModal;
     encoder << deviceScaleFactor;
@@ -135,8 +134,6 @@
         return false;
     if (!decoder.decode(parameters.websiteDataStoreID))
         return false;
-    if (!decoder.decode(parameters.mediaShouldUsePersistentCache))
-        return false;
     if (!decoder.decode(parameters.canRunBeforeUnloadConfirmPanel))
         return false;
     if (!decoder.decode(parameters.canRunModal))

Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.h (198900 => 198901)


--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.h	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.h	2016-03-31 18:24:24 UTC (rev 198901)
@@ -89,7 +89,6 @@
     uint64_t userContentControllerID;
     uint64_t visitedLinkTableID;
     uint64_t websiteDataStoreID;
-    bool mediaShouldUsePersistentCache;
     bool canRunBeforeUnloadConfirmPanel;
     bool canRunModal;
 

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (198900 => 198901)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-03-31 18:24:24 UTC (rev 198901)
@@ -5164,7 +5164,6 @@
     parameters.userContentControllerID = m_userContentController->identifier();
     parameters.visitedLinkTableID = m_visitedLinkStore->identifier();
     parameters.websiteDataStoreID = m_websiteDataStore->identifier();
-    parameters.mediaShouldUsePersistentCache = m_websiteDataStore->isPersistent();
     parameters.canRunBeforeUnloadConfirmPanel = m_uiClient->canRunBeforeUnloadConfirmPanel();
     parameters.canRunModal = m_canRunModal;
     parameters.deviceScaleFactor = deviceScaleFactor();

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (198900 => 198901)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2016-03-31 18:24:24 UTC (rev 198901)
@@ -1147,10 +1147,5 @@
 {
     m_page->findController().didInvalidateDocumentMarkerRects();
 }
-    
-bool WebChromeClient::mediaShouldUsePersistentCache() const
-{
-    return m_page->mediaShouldUsePersistentCache();
-}
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (198900 => 198901)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2016-03-31 18:24:24 UTC (rev 198901)
@@ -335,7 +335,6 @@
 #endif
 
     void didInvalidateDocumentMarkerRects() override;
-    bool mediaShouldUsePersistentCache() const override;
 
     String m_cachedToolTip;
     mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame;

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (198900 => 198901)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-03-31 18:24:24 UTC (rev 198901)
@@ -366,7 +366,6 @@
 #endif
     , m_mainFrameProgressCompleted(false)
     , m_shouldDispatchFakeMouseMoveEvents(true)
-    , m_mediaShouldUsePersistentCache(parameters.mediaShouldUsePersistentCache)
 {
     ASSERT(m_pageID);
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (198900 => 198901)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2016-03-31 18:23:29 UTC (rev 198900)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2016-03-31 18:24:24 UTC (rev 198901)
@@ -931,8 +931,6 @@
 
     void didRestoreScrollPosition();
 
-    bool mediaShouldUsePersistentCache() const { return m_mediaShouldUsePersistentCache; }
-
     bool isControlledByAutomation() const;
     void setControlledByAutomation(bool);
 
@@ -1455,8 +1453,6 @@
 #if USE(OS_STATE)
     std::chrono::system_clock::time_point m_loadCommitTime;
 #endif
-
-    bool m_mediaShouldUsePersistentCache;
 };
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to