Commit e489e468 authored by enne@google.com's avatar enne@google.com
Browse files

Hide all ancestors of the full screen element when going full screen

https://bugs.webkit.org/show_bug.cgi?id=96332

Reviewed by James Robinson.

Source/WebCore:

Since fixed position elements can now sometimes become stacking
contexts, explicitly set position: static on full-screen ancestors so
that there are no stacking context ancestors that could cause the full
screen element to become incorrectly sorted.

Test: fullscreen/full-screen-fixed-pos-parent.html

* css/fullscreen.css:
(:-webkit-full-screen-ancestor:not(iframe)):

LayoutTests:

This test has an all red image that (without this patch) incorrectly
sorts on top of the full screen element. With this patch, the all
green full screen element appears on top.

* fullscreen/full-screen-fixed-pos-parent-expected.png: Added.
* fullscreen/full-screen-fixed-pos-parent-expected.txt: Added.
* fullscreen/full-screen-fixed-pos-parent.html: Added.
* fullscreen/resources/green.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1e498553
2012-09-13 Adrienne Walker <enne@google.com>
Hide all ancestors of the full screen element when going full screen
https://bugs.webkit.org/show_bug.cgi?id=96332
Reviewed by James Robinson.
This test has an all red image that (without this patch) incorrectly
sorts on top of the full screen element. With this patch, the all
green full screen element appears on top.
* fullscreen/full-screen-fixed-pos-parent-expected.png: Added.
* fullscreen/full-screen-fixed-pos-parent-expected.txt: Added.
* fullscreen/full-screen-fixed-pos-parent.html: Added.
* fullscreen/resources/green.html: Added.
2012-09-13 Adam Barth <abarth@webkit.org>
 
REGRESSION(r125126): It made fast/events/keyevent-iframe-removed-crash.html assert
<!DOCTYPE html>
<html>
<style>
#bad {
position: fixed;
top: 0px;
left: 0px;
background-color: red;
width: 100%;
height: 100%;
}
#fixed-container {
position: fixed;
top: 0px;
left: 0px;
z-index: 0;
}
#fullscreenme {
height: 400px;
width: 400px;
border: 0px;
}
</style>
</head>
<script src="full-screen-test.js"></script>
<script>
if (window.internals)
window.internals.settings.setFixedPositionCreatesStackingContext(true);
function doTest() {
if (window.testRunner) {
testRunner.dumpAsText(true);
testRunner.waitUntilDone();
}
document.body.offsetTop;
var fullscreen = document.getElementById('fullscreenme');
var fullscreenChangeEvent = function(event) {
if (window.testRunner)
testRunner.notifyDone();
};
document.addEventListener('webkitfullscreenchange', fullscreenChangeEvent);
document.addEventListener('keydown', function () {
fullscreen.webkitRequestFullScreen();
});
if (window.eventSender)
eventSender.keyDown('a');
}
if ("webkitRequestFullScreen" in Element.prototype)
window.addEventListener("load", doTest, false);
</script>
<body>
<!-- when full screening the iframe, bad should not be visible -->
<div id="fixed-container">
<iframe id="fullscreenme" src="resources/green.html"></iframe>
</div>
<div id="bad"></div>
</body>
</html>
<html>
<style>
body {
background-color: green;
}
</style>
<body></body>
</html>
2012-09-13 Adrienne Walker <enne@google.com>
Hide all ancestors of the full screen element when going full screen
https://bugs.webkit.org/show_bug.cgi?id=96332
Reviewed by James Robinson.
Since fixed position elements can now sometimes become stacking
contexts, explicitly set position: static on full-screen ancestors so
that there are no stacking context ancestors that could cause the full
screen element to become incorrectly sorted.
Test: fullscreen/full-screen-fixed-pos-parent.html
* css/fullscreen.css:
(:-webkit-full-screen-ancestor:not(iframe)):
2012-09-13 Adam Barth <abarth@webkit.org>
 
REGRESSION(r125126): It made fast/events/keyevent-iframe-removed-crash.html assert
......@@ -9,6 +9,7 @@
:-webkit-full-screen-ancestor:not(iframe) {
z-index: auto !important;
position: static !important;
opacity: 1 !important;
-webkit-transform: none !important;
-webkit-mask: none !important;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment