haikuwebkit/LayoutTests/fullscreen/full-screen-iframe-allowed....

21 lines
808 B
HTML
Raw Permalink Normal View History

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: Canonical link: https://commits.webkit.org/70918@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-14 17:52:31 +00:00
<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=56264">bug 56264</a>:
Handle entering full screen security restrictions</p>
2011-04-19 Jer Noble <jer.noble@apple.com> Reviewed by Daniel Bates. Full Screen from within an <iframe> does not cause <iframe> to resize. https://bugs.webkit.org/show_bug.cgi?id=58638 * fullscreen/full-screen-frameset-expected.txt: Added. * fullscreen/full-screen-frameset.html: Added. * fullscreen/content/inner.html: Added. * fullscreen/full-screen-iframe-allowed-expected.txt: Updated. * fullscreen/full-screen-iframe-allowed.html: Add a button with which to trigger full screen mode in Safari. * fullscreen/full-screen-iframe-not-allowed-expected.txt: Updated. * fullscreen/full-screen-iframe-not-allowed.html: Ditto. * fullscreen/resources/allowed.html: Added. * fullscreen/resources/inner.html: Added. 2011-04-19 Jer Noble <jer.noble@apple.com> Reviewed by Daniel Bates. Full Screen from within an <iframe> does not cause <iframe> to resize. https://bugs.webkit.org/show_bug.cgi?id=58638 Tests: fullscreen/full-screen-frameset.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Add the -webkit-full-screen pseudo class to frame elements which contain full screen elements. * css/fullscreen.css: (iframe:-webkit-full-screen): Add iframe-specific styling rules. * dom/Document.cpp: (WebCore::Document::setContainsFullScreenElementRecursively): Added. Walk up each successive document owner element, calling setContainsFullScreenElement() if owner is a frame element. (WebCore::Document::fullScreenIsAllowedForElement): Use the new Element::isFrameElementBase call instead of checking the element's tag name. (WebCore::Document::webkitWillEnterFullScreenForElement): Mark any containing iframes as containing a full screen element. (WebCore::Document::webkitWillExitFullScreenForElement): Ditto. * dom/Element.h: (WebCore::Element::isFrameElementBase): Added. * html/HTMLFrameElement.h: (WebCore::HTMLFrameElement::allowFullScreen): Disable full screen from within HTMLFrameElements. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Added. * html/HTMLFrameElementBase.h: (WebCore::HTMLFrameElementBase::containsFullScreenElement): Added. (WebCore::HTMLFrameElementBase::isFrameElementBase): Added. 2011-04-19 Jer Noble <jer.noble@apple.com> Reviewed by Daniel Bates. Full Screen from within an <iframe> does not cause <iframe> to resize. https://bugs.webkit.org/show_bug.cgi?id=58638 Tests: fullscreen/full-screen-frameset-allowed.html fullscreen/full-screen-frameset-not-allowed.html Return the _element's document instead of the WKView's document, which will be different in the case of elements within <iframe>s. * WebView/WebFullScreenController.mm: (-[WebFullScreenController _document]): 2011-04-19 Jer Noble <jer.noble@apple.com> Reviewed by Daniel Bates. Full Screen from within an <iframe> does not cause <iframe> to resize. https://bugs.webkit.org/show_bug.cgi?id=58638 Tests: fullscreen/full-screen-frameset-allowed.html fullscreen/full-screen-frameset-not-allowed.html * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Cancel the background animation if the full screen animation finishes first. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): m_fullScreenRootLayer was uninitialized. Canonical link: https://commits.webkit.org/74435@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-04-22 23:52:44 +00:00
<p>To test manually, click the "Go full screen" button - the page should enter full screen mode.</p>
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: Canonical link: https://commits.webkit.org/70918@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-14 17:52:31 +00:00
<script src="full-screen-test.js"></script>
<script>
function runTest() {
var frame = document.getElementById('frame');
waitForEvent(frame.contentDocument, 'webkitfullscreenchange', function() {
2011-04-19 Jer Noble <jer.noble@apple.com> Reviewed by Daniel Bates. Full Screen from within an <iframe> does not cause <iframe> to resize. https://bugs.webkit.org/show_bug.cgi?id=58638 * fullscreen/full-screen-frameset-expected.txt: Added. * fullscreen/full-screen-frameset.html: Added. * fullscreen/content/inner.html: Added. * fullscreen/full-screen-iframe-allowed-expected.txt: Updated. * fullscreen/full-screen-iframe-allowed.html: Add a button with which to trigger full screen mode in Safari. * fullscreen/full-screen-iframe-not-allowed-expected.txt: Updated. * fullscreen/full-screen-iframe-not-allowed.html: Ditto. * fullscreen/resources/allowed.html: Added. * fullscreen/resources/inner.html: Added. 2011-04-19 Jer Noble <jer.noble@apple.com> Reviewed by Daniel Bates. Full Screen from within an <iframe> does not cause <iframe> to resize. https://bugs.webkit.org/show_bug.cgi?id=58638 Tests: fullscreen/full-screen-frameset.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Add the -webkit-full-screen pseudo class to frame elements which contain full screen elements. * css/fullscreen.css: (iframe:-webkit-full-screen): Add iframe-specific styling rules. * dom/Document.cpp: (WebCore::Document::setContainsFullScreenElementRecursively): Added. Walk up each successive document owner element, calling setContainsFullScreenElement() if owner is a frame element. (WebCore::Document::fullScreenIsAllowedForElement): Use the new Element::isFrameElementBase call instead of checking the element's tag name. (WebCore::Document::webkitWillEnterFullScreenForElement): Mark any containing iframes as containing a full screen element. (WebCore::Document::webkitWillExitFullScreenForElement): Ditto. * dom/Element.h: (WebCore::Element::isFrameElementBase): Added. * html/HTMLFrameElement.h: (WebCore::HTMLFrameElement::allowFullScreen): Disable full screen from within HTMLFrameElements. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Added. * html/HTMLFrameElementBase.h: (WebCore::HTMLFrameElementBase::containsFullScreenElement): Added. (WebCore::HTMLFrameElementBase::isFrameElementBase): Added. 2011-04-19 Jer Noble <jer.noble@apple.com> Reviewed by Daniel Bates. Full Screen from within an <iframe> does not cause <iframe> to resize. https://bugs.webkit.org/show_bug.cgi?id=58638 Tests: fullscreen/full-screen-frameset-allowed.html fullscreen/full-screen-frameset-not-allowed.html Return the _element's document instead of the WKView's document, which will be different in the case of elements within <iframe>s. * WebView/WebFullScreenController.mm: (-[WebFullScreenController _document]): 2011-04-19 Jer Noble <jer.noble@apple.com> Reviewed by Daniel Bates. Full Screen from within an <iframe> does not cause <iframe> to resize. https://bugs.webkit.org/show_bug.cgi?id=58638 Tests: fullscreen/full-screen-frameset-allowed.html fullscreen/full-screen-frameset-not-allowed.html * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Cancel the background animation if the full screen animation finishes first. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): m_fullScreenRootLayer was uninitialized. Canonical link: https://commits.webkit.org/74435@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-04-22 23:52:44 +00:00
test("document.getElementById('frame').contentDocument.width==document.width")
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: Canonical link: https://commits.webkit.org/70918@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-14 17:52:31 +00:00
endTest();
});
runWithKeyDown(function() {
frame.contentDocument.documentElement.webkitRequestFullScreen();
});
}
</script>
Accept 'allowfullscreen' in addition to 'webkitallowfullscreen'. https://bugs.webkit.org/show_bug.cgi?id=110374 Reviewed by Adam Barth. Source/WebCore: The fullscreen API also includes a new HTML attribute for iframes which permits its use. That attribute, 'allowfullcreen' is now included in the HTML specification [1] and is stable enough to remove the webkit prefix. [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-allowfullscreen Tests: fullscreen/full-screen-enabled-prefixed.html fullscreen/full-screen-iframe-allowed-prefixed.html fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute.html * dom/Document.cpp: (WebCore::isAttributeOnAllOwners): (WebCore::Document::fullScreenIsAllowedForElement): (WebCore::Document::webkitFullscreenEnabled): * html/HTMLAttributeNames.in: LayoutTests: Two previous tests duplicated to preserve testing webkitallowfullscreen and then modified to test allowfullscreen. A new test 'full-screen-iframe-with-mixed-allow-webkitallow-attribute.html' added to test a mixed nesting of iframs with both allowfullscreen and webkitallowfullscreen. * fullscreen/full-screen-enabled-prefixed-expected.txt: Added. * fullscreen/full-screen-enabled-prefixed.html: Copied from LayoutTests/fullscreen/full-screen-enabled.html. * fullscreen/full-screen-enabled.html: * fullscreen/full-screen-iframe-allowed-prefixed-expected.txt: Added. * fullscreen/full-screen-iframe-allowed-prefixed.html: Copied from LayoutTests/fullscreen/full-screen-iframe-allowed.html. * fullscreen/full-screen-iframe-allowed.html: * fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute-expected.txt: * fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute.html: Added. * fullscreen/resources/full-screen-iframe-with-mixed-allow-webkitallow-iframe1.html: Added. * fullscreen/resources/full-screen-iframe-with-mixed-allow-webkitallow-iframe2.html: Added. Canonical link: https://commits.webkit.org/128686@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-21 00:32:26 +00:00
<iframe id="frame" src="resources/inner.html" width="300" height="100" onload="runTest()" allowfullscreen>
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: Canonical link: https://commits.webkit.org/70918@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-14 17:52:31 +00:00
</iframe>