2011-03-12  Jer Noble  <jer.noble@apple.com>

        Reviewed by Eric Carlson.

        FullScreen: Handle entering full screen security restrictions
        https://bugs.webkit.org/show_bug.cgi?id=56264

        * fullscreen/full-screen-css.html: Use runWithKeyDown.
        * fullscreen/full-screen-remove-ancestor.html: Ditto.
        * fullscreen/full-screen-remove.html: Ditto.
        * fullscreen/full-screen-request.html: Ditto.
        * fullscreen/full-screen-twice.html: Ditto.
        * fullscreen/full-screen-test.js:
        * fullscreen/full-screen-iframe-allowed-expected.txt: Added.
        * fullscreen/full-screen-iframe-allowed.html: Added.
        * fullscreen/full-screen-iframe-not-allowed-expected.txt: Added.
        * fullscreen/full-screen-iframe-not-allowed.html: Added.
        (runWithKeyDown): Added.  Wraps the command in a keyDown/keyPress
            listener.
        * platform/mac-wk2/Skipped: Added new tests to skipped list.
        * platform/qt-wk2/Skipped: Ditto.
2011-03-13  Jer Noble  <jer.noble@apple.com>

        FullScreen: Handle entering full screen security restrictions
        https://bugs.webkit.org/show_bug.cgi?id=56264

        Tests: fullscreen/full-screen-iframe-allowed.html
               fullscreen/full-screen-iframe-not-allowed.html

        Disable full screen documents in the following conditions:
        1) requesting element is in an iframe which does not have a
        webkitallowfullscreen attribute.
        2) page is not processing a user gesture.

        * dom/Document.cpp:
        (WebCore::Document::fullScreenIsAllowedForElement): Added.  Checks
            to see if elements contained in IFRAMES are allowed to
            enter full screen.
        (WebCore::Document::webkitRequestFullScreenForElement): Checks
            if page is currently processing a user gesture.
        * dom/Document.h:
        * html/HTMLAttributeNames.in: Added webkitallowfullscreenAttr.
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::allowFullScreen): Added.
        * html/HTMLFrameElementBase.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed