Skip to content
  • jer.noble@apple.com's avatar
    Emit an error event when a request to enter full-screen is rejected. · d20c4645
    jer.noble@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=62320
    
    Reviewed by Eric Carlson.
    
    Source/WebCore:
    
    Tests: fullscreen/full-screen-request-rejected.html
           fullscreen/full-screen-request-removed.html
    
    When a request to enter full-screen is rejected, emit an event
    (webkitfullscreenerror) in response.  But emit the event during the next
    trip through the run-loop, like the webkitfullscreenchange event, and so a new
    timer and queue are necessary.
    
    * dom/Document.cpp:
    (WebCore::Document::requestFullScreenForElement): Emit the error event
        if the request does not pass all our requirements.
    * dom/Document.h: Add new ivars.
    * dom/Document.idl: Add support for setting an onfullscreenerror attribute.
    * dom/Element.h: Ditto.
    * dom/Element.idl: Ditto.
    * dom/EventNames.h: Add the name for the error event.
    
    LayoutTests:
    
    * fullscreen/full-screen-iframe-not-allowed-expected.txt:
    * fullscreen/full-screen-iframe-not-allowed.html:
    * fullscreen/full-screen-request-rejected-expected.txt: Added.
    * fullscreen/full-screen-request-rejected.html: Added.
    * fullscreen/full-screen-request-removed-expected: Added.
    * fullscreen/full-screen-request-removed.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d20c4645