Remove dead code: VideoFullscreenModel::isVisible()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Oct 2018 20:15:22 +0000 (20:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Oct 2018 20:15:22 +0000 (20:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190356

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-10-08
Reviewed by Jon Lee.

Source/WebCore:

No new tests because there is no behavior change.

Remove isVisible() since it is no longer used.

* platform/cocoa/VideoFullscreenModel.h:
* platform/cocoa/VideoFullscreenModelVideoElement.h:
* platform/cocoa/VideoFullscreenModelVideoElement.mm:
(WebCore::VideoFullscreenModelVideoElement::isVisible const): Deleted.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(VideoFullscreenControllerContext::isVisible const): Deleted.

Source/WebKit:

Remove isVisible since it is no longer used.

* UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenModelContext::isVisible const): Deleted.
(WebKit::VideoFullscreenManagerProxy::isVisible const): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236934 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/VideoFullscreenModel.h
Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h
Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm
Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h
Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm

index 2caaaba..ce61b4a 100644 (file)
@@ -1,5 +1,23 @@
 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
 
+        Remove dead code: VideoFullscreenModel::isVisible()
+        https://bugs.webkit.org/show_bug.cgi?id=190356
+
+        Reviewed by Jon Lee.
+
+        No new tests because there is no behavior change.
+
+        Remove isVisible() since it is no longer used.
+
+        * platform/cocoa/VideoFullscreenModel.h:
+        * platform/cocoa/VideoFullscreenModelVideoElement.h:
+        * platform/cocoa/VideoFullscreenModelVideoElement.mm:
+        (WebCore::VideoFullscreenModelVideoElement::isVisible const): Deleted.
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        (VideoFullscreenControllerContext::isVisible const): Deleted.
+
+2018-10-08  Jeremy Jones  <jeremyj@apple.com>
+
         Remove dead code: resetMediaState.
         https://bugs.webkit.org/show_bug.cgi?id=190355
 
index 779fe13..a55bb0a 100644 (file)
@@ -53,7 +53,6 @@ public:
     virtual void setVideoLayerGravity(MediaPlayerEnums::VideoGravity) = 0;
     virtual void fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode) = 0;
 
-    virtual bool isVisible() const = 0;
     virtual FloatSize videoDimensions() const = 0;
     virtual bool hasVideo() const = 0;
 
index 3619c42..ab82b5f 100644 (file)
@@ -69,7 +69,6 @@ public:
     WEBCORE_EXPORT void setVideoLayerFrame(FloatRect) override;
     WEBCORE_EXPORT void setVideoLayerGravity(MediaPlayerEnums::VideoGravity) override;
     WEBCORE_EXPORT void fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode) override;
-    WEBCORE_EXPORT bool isVisible() const override;
     FloatSize videoDimensions() const override { return m_videoDimensions; }
     bool hasVideo() const override { return m_hasVideo; }
 
index dfd2456..de092a6 100644 (file)
@@ -201,17 +201,6 @@ void VideoFullscreenModelVideoElement::removeClient(VideoFullscreenModelClient&
     m_clients.remove(&client);
 }
 
-bool VideoFullscreenModelVideoElement::isVisible() const
-{
-    if (!m_videoElement)
-        return false;
-
-    if (Page* page = m_videoElement->document().page())
-        return page->isVisible();
-
-    return false;
-}
-
 void VideoFullscreenModelVideoElement::setHasVideo(bool hasVideo)
 {
     if (hasVideo == m_hasVideo)
index 0648a3c..ac89243 100644 (file)
@@ -197,7 +197,6 @@ private:
     void setVideoLayerFrame(FloatRect) override;
     void setVideoLayerGravity(MediaPlayerEnums::VideoGravity) override;
     void fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode) override;
-    bool isVisible() const override;
     bool hasVideo() const override;
     FloatSize videoDimensions() const override;
     bool isMuted() const override;
@@ -605,12 +604,6 @@ void VideoFullscreenControllerContext::fullscreenModeChanged(HTMLMediaElementEnu
     });
 }
 
-bool VideoFullscreenControllerContext::isVisible() const
-{
-    ASSERT(isUIThread());
-    return m_fullscreenModel ? m_fullscreenModel->isVisible() : false;
-}
-
 bool VideoFullscreenControllerContext::hasVideo() const
 {
     ASSERT(isUIThread());
index 0b1b2e0..ece148b 100644 (file)
@@ -1,5 +1,19 @@
 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
 
+        Remove dead code: VideoFullscreenModel::isVisible()
+        https://bugs.webkit.org/show_bug.cgi?id=190356
+
+        Reviewed by Jon Lee.
+
+        Remove isVisible since it is no longer used.
+
+        * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
+        * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
+        (WebKit::VideoFullscreenModelContext::isVisible const): Deleted.
+        (WebKit::VideoFullscreenManagerProxy::isVisible const): Deleted.
+
+2018-10-08  Jeremy Jones  <jeremyj@apple.com>
+
         Remove dead code: resetMediaState.
         https://bugs.webkit.org/show_bug.cgi?id=190355
 
index 3470441..0534834 100644 (file)
@@ -82,7 +82,6 @@ private:
     void setVideoLayerFrame(WebCore::FloatRect) override;
     void setVideoLayerGravity(WebCore::MediaPlayerEnums::VideoGravity) override;
     void fullscreenModeChanged(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
-    bool isVisible() const override;
     bool hasVideo() const override { return m_hasVideo; }
     WebCore::FloatSize videoDimensions() const override { return m_videoDimensions; }
 #if PLATFORM(IOS)
index 5360a34..c7042a2 100644 (file)
@@ -205,11 +205,6 @@ void VideoFullscreenModelContext::fullscreenModeChanged(WebCore::HTMLMediaElemen
         m_manager->fullscreenModeChanged(m_contextId, mode);
 }
 
-bool VideoFullscreenModelContext::isVisible() const
-{
-    return m_manager ? m_manager->isVisible() : false;
-}
-
 #if PLATFORM(IOS)
 UIViewController *VideoFullscreenModelContext::presentingViewController()
 {
@@ -674,11 +669,6 @@ void VideoFullscreenManagerProxy::fullscreenModeChanged(uint64_t contextId, WebC
     m_page->send(Messages::VideoFullscreenManager::FullscreenModeChanged(contextId, mode), m_page->pageID());
 }
 
-bool VideoFullscreenManagerProxy::isVisible() const
-{
-    return m_page->isViewVisible() && m_page->isInWindow();
-}
-
 void VideoFullscreenManagerProxy::fullscreenMayReturnToInline(uint64_t contextId)
 {
     bool isViewVisible = m_page->isViewVisible();