Skip to content
  • jer.noble@apple.com's avatar
    Full screen will exit during a provisional load of a non-ancestor iframe. · d6d91c14
    jer.noble@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=85230
    
    Reviewed by Maciej Stachowiak .
    
    Source/WebKit/mac:
    
    Only exit full screen mode if the frame being loaded contains the full
    screen element.
    
    * WebView/WebView.mm:
    (-[WebView _didStartProvisionalLoadForFrame:]): Give the UIDelegate a first crack at handling the
    request to close the full screen window when a provisional load occurs.
    
    Source/WebKit2:
    
    Only exit full screen mode if the frame being loaded contains the full
    screen element:
    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
    (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
    
    Move the full screen exiting logic up into WebFrameLoaderClient in the
    WebProcess:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
    
    Add a WebFullScreenManager "close" method & message:
    * UIProcess/WebFullScreenManagerProxy.messages.in:
    * WebProcess/FullScreen/WebFullScreenManager.cpp:
    (WebKit::WebFullScreenManager::close):
    * WebProcess/FullScreen/WebFullScreenManager.h:
    
    Add support for this new message to the WKBundlePage and client:
    * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
    * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
    (WebKit::InjectedBundlePageFullScreenClient::closeFullScreen):
    * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
    
    Tools:
    
    Add support for the new UIDelegate webView:closeFullScreenWithListener: method:
    * DumpRenderTree/mac/UIDelegate.mm:
    (-[UIDelegate webView:closeFullScreenWithListener:]):
    
    Add support for the new closeFullScreen injected bundle method:
    * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
    (WTR::InjectedBundlePage::InjectedBundlePage):
    (WTR::InjectedBundlePage::closeFullScreen):
    * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
    
    LayoutTests:
    
    * fullscreen/non-ancestor-iframe-expected.txt: Added.
    * fullscreen/non-ancestor-iframe.html: Added.
    * fullscreen/resources/empty.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d6d91c14