Title: [236088] trunk/Source
Revision
236088
Author
[email protected]
Date
2018-09-17 15:05:45 -0700 (Mon, 17 Sep 2018)

Log Message

Add more Fullscreen logging
https://bugs.webkit.org/show_bug.cgi?id=189656

Reviewed by Jer Noble.

Add some fullscreen logging so I can tell whether WebFullScreenManager ever releases
the fullscreen element.

Source/WebCore:

* platform/cocoa/VideoFullscreenModelVideoElement.mm:
(VideoFullscreenModelVideoElement::VideoFullscreenModelVideoElement):
(VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement):
(VideoFullscreenModelVideoElement::setVideoElement):

Source/WebKit:

* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::WebFullScreenManager):
(WebKit::WebFullScreenManager::videoControlsManagerDidChange):
(WebKit::WebFullScreenManager::setPIPStandbyElement):
(WebKit::WebFullScreenManager::enterFullScreenForElement):
(WebKit::WebFullScreenManager::exitFullScreenForElement):
(WebKit::WebFullScreenManager::willEnterFullScreen):
(WebKit::WebFullScreenManager::didEnterFullScreen):
(WebKit::WebFullScreenManager::willExitFullScreen):
(WebKit::WebFullScreenManager::didExitFullScreen):
(WebKit::WebFullScreenManager::close):
* WebProcess/FullScreen/WebFullScreenManager.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (236087 => 236088)


--- trunk/Source/WebCore/ChangeLog	2018-09-17 22:05:42 UTC (rev 236087)
+++ trunk/Source/WebCore/ChangeLog	2018-09-17 22:05:45 UTC (rev 236088)
@@ -1,3 +1,18 @@
+2018-09-17  Simon Fraser  <[email protected]>
+
+        Add more Fullscreen logging
+        https://bugs.webkit.org/show_bug.cgi?id=189656
+
+        Reviewed by Jer Noble.
+
+        Add some fullscreen logging so I can tell whether WebFullScreenManager ever releases
+        the fullscreen element.
+
+        * platform/cocoa/VideoFullscreenModelVideoElement.mm:
+        (VideoFullscreenModelVideoElement::VideoFullscreenModelVideoElement):
+        (VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement):
+        (VideoFullscreenModelVideoElement::setVideoElement):
+
 2018-09-14  Simon Fraser  <[email protected]>
 
         Add support for dumping the GraphicsLayer tree via notifyutil

Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm (236087 => 236088)


--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm	2018-09-17 22:05:42 UTC (rev 236087)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm	2018-09-17 22:05:45 UTC (rev 236088)
@@ -50,10 +50,12 @@
 VideoFullscreenModelVideoElement::VideoFullscreenModelVideoElement()
     : EventListener(EventListener::CPPEventListenerType)
 {
+    LOG(Fullscreen, "VideoFullscreenModelVideoElement %p ctor", this);
 }
 
 VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement()
 {
+    LOG(Fullscreen, "VideoFullscreenModelVideoElement %p dtor", this);
 }
 
 void VideoFullscreenModelVideoElement::setVideoElement(HTMLVideoElement* videoElement)
@@ -61,6 +63,8 @@
     if (m_videoElement == videoElement)
         return;
 
+    LOG(Fullscreen, "VideoFullscreenModelVideoElement %p setVideoElement(%p)", this, videoElement);
+
     if (m_videoElement && m_videoElement->videoFullscreenLayer())
         m_videoElement->setVideoFullscreenLayer(nullptr);
 

Modified: trunk/Source/WebKit/ChangeLog (236087 => 236088)


--- trunk/Source/WebKit/ChangeLog	2018-09-17 22:05:42 UTC (rev 236087)
+++ trunk/Source/WebKit/ChangeLog	2018-09-17 22:05:45 UTC (rev 236088)
@@ -1,3 +1,26 @@
+2018-09-17  Simon Fraser  <[email protected]>
+
+        Add more Fullscreen logging
+        https://bugs.webkit.org/show_bug.cgi?id=189656
+
+        Reviewed by Jer Noble.
+
+        Add some fullscreen logging so I can tell whether WebFullScreenManager ever releases
+        the fullscreen element.
+
+        * WebProcess/FullScreen/WebFullScreenManager.cpp:
+        (WebKit::WebFullScreenManager::WebFullScreenManager):
+        (WebKit::WebFullScreenManager::videoControlsManagerDidChange):
+        (WebKit::WebFullScreenManager::setPIPStandbyElement):
+        (WebKit::WebFullScreenManager::enterFullScreenForElement):
+        (WebKit::WebFullScreenManager::exitFullScreenForElement):
+        (WebKit::WebFullScreenManager::willEnterFullScreen):
+        (WebKit::WebFullScreenManager::didEnterFullScreen):
+        (WebKit::WebFullScreenManager::willExitFullScreen):
+        (WebKit::WebFullScreenManager::didExitFullScreen):
+        (WebKit::WebFullScreenManager::close):
+        * WebProcess/FullScreen/WebFullScreenManager.h:
+
 2018-09-17  Tim Horton  <[email protected]>
 
         Swipe snapshot can get stuck if swiping is disabled while it is visible

Modified: trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp (236087 => 236088)


--- trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp	2018-09-17 22:05:42 UTC (rev 236087)
+++ trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp	2018-09-17 22:05:45 UTC (rev 236088)
@@ -28,6 +28,7 @@
 #if ENABLE(FULLSCREEN_API)
 
 #include "Connection.h"
+#include "Logging.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebFrame.h"
 #include "WebFullScreenManagerProxyMessages.h"
@@ -70,8 +71,7 @@
 }
 
 WebFullScreenManager::WebFullScreenManager(WebPage* page)
-    : m_topContentInset(0)
-    , m_page(page)
+    : m_page(page)
 {
 }
     
@@ -87,6 +87,8 @@
 void WebFullScreenManager::videoControlsManagerDidChange()
 {
 #if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+    LOG(Fullscreen, "WebFullScreenManager %p videoControlsManagerDidChange()", this);
+
     auto* currentPlaybackControlsElement = m_page->playbackSessionManager().currentPlaybackControlsElement();
     if (!m_element || !is<HTMLVideoElement>(currentPlaybackControlsElement)) {
         setPIPStandbyElement(nullptr);
@@ -103,6 +105,8 @@
     if (pipStandbyElement == m_pipStandbyElement)
         return;
 
+    LOG(Fullscreen, "WebFullScreenManager %p setPIPStandbyElement() - old element %p, new element %p", this, m_pipStandbyElement.get(), pipStandbyElement);
+
     if (m_pipStandbyElement)
         m_pipStandbyElement->setVideoFullscreenStandby(false);
 
@@ -128,6 +132,8 @@
 
 void WebFullScreenManager::enterFullScreenForElement(WebCore::Element* element)
 {
+    LOG(Fullscreen, "WebFullScreenManager %p enterFullScreenForElement(%p)", this, element);
+
     ASSERT(element);
     m_element = element;
     m_initialFrame = screenRectOfContents(m_element.get());
@@ -136,12 +142,14 @@
 
 void WebFullScreenManager::exitFullScreenForElement(WebCore::Element* element)
 {
+    LOG(Fullscreen, "WebFullScreenManager %p exitFullScreenForElement(%p) - fullscreen element %p", this, element, m_element.get());
     m_page->injectedBundleFullScreenClient().exitFullScreenForElement(m_page.get(), element);
 }
 
 void WebFullScreenManager::willEnterFullScreen()
 {
-    ASSERT(m_element);
+    LOG(Fullscreen, "WebFullScreenManager %p willEnterFullScreen() - element %p", this, m_element.get());
+
     m_element->document().webkitWillEnterFullScreenForElement(m_element.get());
 #if !PLATFORM(IOS)
     m_page->hidePageBanners();
@@ -154,7 +162,8 @@
 
 void WebFullScreenManager::didEnterFullScreen()
 {
-    ASSERT(m_element);
+    LOG(Fullscreen, "WebFullScreenManager %p didEnterFullScreen() - element %p", this, m_element.get());
+
     m_element->document().webkitDidEnterFullScreenForElement(m_element.get());
 
 #if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
@@ -165,6 +174,7 @@
 
 void WebFullScreenManager::willExitFullScreen()
 {
+    LOG(Fullscreen, "WebFullScreenManager %p willExitFullScreen() - element %p", this, m_element.get());
     ASSERT(m_element);
 
 #if ENABLE(VIDEO)
@@ -181,6 +191,8 @@
 
 void WebFullScreenManager::didExitFullScreen()
 {
+    LOG(Fullscreen, "WebFullScreenManager %p didExitFullScreen() - element %p", this, m_element.get());
+
     ASSERT(m_element);
     setFullscreenInsets(FloatBoxExtent());
     setFullscreenAutoHideDuration(0_s);
@@ -201,6 +213,7 @@
 
 void WebFullScreenManager::close()
 {
+    LOG(Fullscreen, "WebFullScreenManager %p close()", this);
     m_page->injectedBundleFullScreenClient().closeFullScreen(m_page.get());
 }
 

Modified: trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h (236087 => 236088)


--- trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h	2018-09-17 22:05:42 UTC (rev 236087)
+++ trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h	2018-09-17 22:05:45 UTC (rev 236088)
@@ -22,9 +22,9 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef WebFullScreenManager_h
-#define WebFullScreenManager_h
 
+#pragma once
+
 #if ENABLE(FULLSCREEN_API)
 
 #include "WebCoreArgumentCoders.h"
@@ -89,7 +89,7 @@
     WebCore::IntRect m_initialFrame;
     WebCore::IntRect m_finalFrame;
     WebCore::IntPoint m_scrollPosition;
-    float m_topContentInset;
+    float m_topContentInset { 0 };
     RefPtr<WebPage> m_page;
     RefPtr<WebCore::Element> m_element;
 #if ENABLE(VIDEO)
@@ -100,5 +100,3 @@
 } // namespace WebKit
 
 #endif // ENABLE(FULLSCREEN_API)
-
-#endif // WebFullScreenManager_h
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to