2011-03-12 Jer Noble <jer.noble@apple.com>
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Mar 2011 17:52:31 +0000 (17:52 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Mar 2011 17:52:31 +0000 (17:52 +0000)
commit03c527ef27848d9e8663f595d292caae68d5d133
treebbfa92f75c5e7aa16af5ee197bf85deec46e5be1
parent14b93ae69226432f35b3790a600a4ad68317bfca
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: https://svn.webkit.org/repository/webkit/trunk@81038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/fullscreen/full-screen-css.html
LayoutTests/fullscreen/full-screen-iframe-allowed-expected.txt [new file with mode: 0644]
LayoutTests/fullscreen/full-screen-iframe-allowed.html [new file with mode: 0644]
LayoutTests/fullscreen/full-screen-iframe-not-allowed-expected.txt [new file with mode: 0644]
LayoutTests/fullscreen/full-screen-iframe-not-allowed.html [new file with mode: 0644]
LayoutTests/fullscreen/full-screen-remove-ancestor.html
LayoutTests/fullscreen/full-screen-remove.html
LayoutTests/fullscreen/full-screen-request.html
LayoutTests/fullscreen/full-screen-test.js
LayoutTests/fullscreen/full-screen-twice.html
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/qt-wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLFrameElementBase.h