Changeset 236088 in webkit


Ignore:
Timestamp:
Sep 17, 2018, 3:05:45 PM (7 years ago)
Author:
Simon Fraser
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:
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r236087 r236088  
     12018-09-17  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add more Fullscreen logging
     4        https://bugs.webkit.org/show_bug.cgi?id=189656
     5
     6        Reviewed by Jer Noble.
     7
     8        Add some fullscreen logging so I can tell whether WebFullScreenManager ever releases
     9        the fullscreen element.
     10
     11        * platform/cocoa/VideoFullscreenModelVideoElement.mm:
     12        (VideoFullscreenModelVideoElement::VideoFullscreenModelVideoElement):
     13        (VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement):
     14        (VideoFullscreenModelVideoElement::setVideoElement):
     15
    1162018-09-14  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm

    r233926 r236088  
    5151    : EventListener(EventListener::CPPEventListenerType)
    5252{
     53    LOG(Fullscreen, "VideoFullscreenModelVideoElement %p ctor", this);
    5354}
    5455
    5556VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement()
    5657{
     58    LOG(Fullscreen, "VideoFullscreenModelVideoElement %p dtor", this);
    5759}
    5860
     
    6163    if (m_videoElement == videoElement)
    6264        return;
     65
     66    LOG(Fullscreen, "VideoFullscreenModelVideoElement %p setVideoElement(%p)", this, videoElement);
    6367
    6468    if (m_videoElement && m_videoElement->videoFullscreenLayer())
  • trunk/Source/WebKit/ChangeLog

    r236086 r236088  
     12018-09-17  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add more Fullscreen logging
     4        https://bugs.webkit.org/show_bug.cgi?id=189656
     5
     6        Reviewed by Jer Noble.
     7
     8        Add some fullscreen logging so I can tell whether WebFullScreenManager ever releases
     9        the fullscreen element.
     10
     11        * WebProcess/FullScreen/WebFullScreenManager.cpp:
     12        (WebKit::WebFullScreenManager::WebFullScreenManager):
     13        (WebKit::WebFullScreenManager::videoControlsManagerDidChange):
     14        (WebKit::WebFullScreenManager::setPIPStandbyElement):
     15        (WebKit::WebFullScreenManager::enterFullScreenForElement):
     16        (WebKit::WebFullScreenManager::exitFullScreenForElement):
     17        (WebKit::WebFullScreenManager::willEnterFullScreen):
     18        (WebKit::WebFullScreenManager::didEnterFullScreen):
     19        (WebKit::WebFullScreenManager::willExitFullScreen):
     20        (WebKit::WebFullScreenManager::didExitFullScreen):
     21        (WebKit::WebFullScreenManager::close):
     22        * WebProcess/FullScreen/WebFullScreenManager.h:
     23
    1242018-09-17  Tim Horton  <timothy_horton@apple.com>
    225
  • trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp

    r235906 r236088  
    2929
    3030#include "Connection.h"
     31#include "Logging.h"
    3132#include "WebCoreArgumentCoders.h"
    3233#include "WebFrame.h"
     
    7172
    7273WebFullScreenManager::WebFullScreenManager(WebPage* page)
    73     : m_topContentInset(0)
    74     , m_page(page)
     74    : m_page(page)
    7575{
    7676}
     
    8888{
    8989#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
     90    LOG(Fullscreen, "WebFullScreenManager %p videoControlsManagerDidChange()", this);
     91
    9092    auto* currentPlaybackControlsElement = m_page->playbackSessionManager().currentPlaybackControlsElement();
    9193    if (!m_element || !is<HTMLVideoElement>(currentPlaybackControlsElement)) {
     
    104106        return;
    105107
     108    LOG(Fullscreen, "WebFullScreenManager %p setPIPStandbyElement() - old element %p, new element %p", this, m_pipStandbyElement.get(), pipStandbyElement);
     109
    106110    if (m_pipStandbyElement)
    107111        m_pipStandbyElement->setVideoFullscreenStandby(false);
     
    129133void WebFullScreenManager::enterFullScreenForElement(WebCore::Element* element)
    130134{
     135    LOG(Fullscreen, "WebFullScreenManager %p enterFullScreenForElement(%p)", this, element);
     136
    131137    ASSERT(element);
    132138    m_element = element;
     
    137143void WebFullScreenManager::exitFullScreenForElement(WebCore::Element* element)
    138144{
     145    LOG(Fullscreen, "WebFullScreenManager %p exitFullScreenForElement(%p) - fullscreen element %p", this, element, m_element.get());
    139146    m_page->injectedBundleFullScreenClient().exitFullScreenForElement(m_page.get(), element);
    140147}
     
    142149void WebFullScreenManager::willEnterFullScreen()
    143150{
    144     ASSERT(m_element);
     151    LOG(Fullscreen, "WebFullScreenManager %p willEnterFullScreen() - element %p", this, m_element.get());
     152
    145153    m_element->document().webkitWillEnterFullScreenForElement(m_element.get());
    146154#if !PLATFORM(IOS)
     
    155163void WebFullScreenManager::didEnterFullScreen()
    156164{
    157     ASSERT(m_element);
     165    LOG(Fullscreen, "WebFullScreenManager %p didEnterFullScreen() - element %p", this, m_element.get());
     166
    158167    m_element->document().webkitDidEnterFullScreenForElement(m_element.get());
    159168
     
    166175void WebFullScreenManager::willExitFullScreen()
    167176{
     177    LOG(Fullscreen, "WebFullScreenManager %p willExitFullScreen() - element %p", this, m_element.get());
    168178    ASSERT(m_element);
    169179
     
    182192void WebFullScreenManager::didExitFullScreen()
    183193{
     194    LOG(Fullscreen, "WebFullScreenManager %p didExitFullScreen() - element %p", this, m_element.get());
     195
    184196    ASSERT(m_element);
    185197    setFullscreenInsets(FloatBoxExtent());
     
    202214void WebFullScreenManager::close()
    203215{
     216    LOG(Fullscreen, "WebFullScreenManager %p close()", this);
    204217    m_page->injectedBundleFullScreenClient().closeFullScreen(m_page.get());
    205218}
  • trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h

    r233671 r236088  
    2323 * THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25 #ifndef WebFullScreenManager_h
    26 #define WebFullScreenManager_h
     25
     26#pragma once
    2727
    2828#if ENABLE(FULLSCREEN_API)
     
    9090    WebCore::IntRect m_finalFrame;
    9191    WebCore::IntPoint m_scrollPosition;
    92     float m_topContentInset;
     92    float m_topContentInset { 0 };
    9393    RefPtr<WebPage> m_page;
    9494    RefPtr<WebCore::Element> m_element;
     
    101101
    102102#endif // ENABLE(FULLSCREEN_API)
    103 
    104 #endif // WebFullScreenManager_h
Note: See TracChangeset for help on using the changeset viewer.