Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
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
- Loading branch information
Showing
with
213 additions
and 11 deletions.
- +18 −0 LayoutTests/ChangeLog
- +17 −0 LayoutTests/fullscreen/full-screen-frameset-expected.txt
- +35 −0 LayoutTests/fullscreen/full-screen-frameset.html
- +2 −2 LayoutTests/fullscreen/full-screen-iframe-allowed-expected.txt
- +3 −3 LayoutTests/fullscreen/full-screen-iframe-allowed.html
- +1 −1 LayoutTests/fullscreen/full-screen-iframe-not-allowed-expected.txt
- +2 −2 LayoutTests/fullscreen/full-screen-iframe-not-allowed.html
- +3 −0 LayoutTests/fullscreen/resources/inner.html
- +7 −0 LayoutTests/fullscreen/resources/not-allowed.html
- +35 −0 Source/WebCore/ChangeLog
- +3 −0 Source/WebCore/css/CSSStyleSelector.cpp
- +11 −0 Source/WebCore/css/fullscreen.css
- +19 −2 Source/WebCore/dom/Document.cpp
- +1 −0 Source/WebCore/dom/Element.h
- +4 −0 Source/WebCore/html/HTMLFrameElement.h
- +6 −0 Source/WebCore/html/HTMLFrameElementBase.cpp
- +7 −0 Source/WebCore/html/HTMLFrameElementBase.h
- +16 −0 Source/WebKit/mac/ChangeLog
- +1 −1 Source/WebKit/mac/WebView/WebFullScreenController.mm
- +16 −0 Source/WebKit2/ChangeLog
- +5 −0 Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
- +1 −0 Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,17 @@ | ||
|
||
|
||
-------- | ||
Frame: 'header' | ||
-------- | ||
Test for bug 58638: Do not allow fullscreen from within a <frame> element, even with the webkitallowfullscreen attribute set. | ||
|
||
To test manually, click the "Go full screen" button - the page should not enter full screen mode. | ||
|
||
SUCCEED - did not enter full screen! | ||
END OF TEST | ||
|
||
|
||
-------- | ||
Frame: 'frame' | ||
-------- | ||
Go full screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,35 @@ | ||
<script src="full-screen-test.js"></script> | ||
<script> | ||
if (window.layoutTestController) | ||
layoutTestController.dumpChildFramesAsText(); | ||
|
||
var waitingFor = 2; | ||
function runTest() { | ||
if (--waitingFor) | ||
return; | ||
var frame = document.getElementById('frame'); | ||
|
||
waitForEvent(frame.contentDocument, 'webkitfullscreenchange', function() { | ||
consoleWrite("FAIL - entered full screen!"); | ||
endTest(); | ||
if (layoutTestController) | ||
layoutTestController.notifyDone(); | ||
}); | ||
|
||
runWithKeyDown(function() { | ||
|
||
setTimeout(function() { | ||
consoleWrite("SUCCEED - did not enter full screen!"); | ||
endTest(); | ||
if (layoutTestController) | ||
layoutTestController.notifyDone(); | ||
}, 50); | ||
|
||
frame.contentDocument.documentElement.webkitRequestFullScreen(); | ||
}); | ||
} | ||
</script> | ||
<frameset rows="150,*"> | ||
<frame name="header" src="resources/not-allowed.html" webkitfullscreenallowed onload="runTest()"> | ||
<frame id="frame" src="resources/inner.html" onload="runTest()"> | ||
</frameset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,8 +1,8 @@ | ||
Test for bug 56264: Handle entering full screen security restrictions | ||
|
||
To test manually, click the "Go full screen" button - the page should enter full screen mode. | ||
|
||
EVENT(webkitfullscreenchange) | ||
TEST(document.getElementById('frame').contentDocument.width==document.width) OK | ||
END OF TEST | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,3 @@ | ||
<body> | ||
<button onclick="document.documentElement.webkitRequestFullScreen()">Go full screen</button> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,7 @@ | ||
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=58638">bug 58638</a>: | ||
Do not allow fullscreen from within a <frame> element, even with the <i>webkitallowfullscreen</i> attribute set.</p> | ||
<p>To test manually, click the "Go full screen" button - the page should not enter full screen mode.</p> | ||
<div id="console"></div> | ||
<script> | ||
top.console = document.getElementById('console'); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -769,7 +769,7 @@ - (WebFullscreenWindow *)_fullscreenWindow | ||
|
||
- (Document*)_document | ||
{ | ||
return _element->document(); | ||
} | ||
|
||
- (CFTimeInterval)_animationDuration | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters