Skip to content
  • scheib@chromium.org's avatar
    Unify allowfullscreen logic in Document::webkitFullScreenEnabled and fullScreenIsAllowedForElement. · e0e6003f
    scheib@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=91448
    
    Reviewed by Adrienne Walker.
    
    Unifies redundant traversal logic and static cast previously used
    to determine if an element or document can be made fullscreen.
    This clean up prepares for pointer lock, which will use the same logic.
    
    Added a test to detect an edge case of an owning document with
    fullscreen permision moving an iframe to fullscreen, while that iframe
    does not have permision for its contents to be made fullscreen.
    
    Source/WebCore:
    
    Test: fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent.html
    
    * dom/Document.cpp:
    (WebCore::isAttributeOnAllOwners):
    (WebCore::Document::fullScreenIsAllowedForElement):
    (WebCore::Document::webkitFullscreenEnabled):
    
    LayoutTests:
    
    * fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent-expected.txt: Added.
    * fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e0e6003f