Title: [128902] branches/chromium/1229
Revision
128902
Author
[email protected]
Date
2012-09-18 09:51:26 -0700 (Tue, 18 Sep 2012)

Log Message

Merge 128514 - 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.


[email protected]

Modified Paths

Added Paths

Diff

Copied: branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.png (from rev 128514, trunk/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.png) (0 => 128902)


--- branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.png	                        (rev 0)
+++ branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.png	2012-09-18 16:51:26 UTC (rev 128902)
@@ -0,0 +1,6 @@
+\x89PNG
+
+
+IHDR X')tEXtchecksumf9cdba21f7e2009389f80333d1d70551\xA8sY
+\xA9IDATx\x9C\xED\xD6\xC1	 \xC0\xB0\xD3\xC9\xDD%
+\x82$\xF4\xD95g\xED\xD7\xBF1X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x833X1\x83\xBBg\xBC0\xE4\xF49\xCAIEND\xAEB`\x82
\ No newline at end of file

Copied: branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.txt (from rev 128514, trunk/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.txt) (0 => 128902)


--- branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.txt	                        (rev 0)
+++ branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent-expected.txt	2012-09-18 16:51:26 UTC (rev 128902)
@@ -0,0 +1,2 @@
+
+

Copied: branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent.html (from rev 128514, trunk/LayoutTests/fullscreen/full-screen-fixed-pos-parent.html) (0 => 128902)


--- branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent.html	                        (rev 0)
+++ branches/chromium/1229/LayoutTests/fullscreen/full-screen-fixed-pos-parent.html	2012-09-18 16:51:26 UTC (rev 128902)
@@ -0,0 +1,63 @@
+<!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=""
+<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=""
+    </div>
+    <div id="bad"></div>
+</body>
+</html>

Copied: branches/chromium/1229/LayoutTests/fullscreen/resources/green.html (from rev 128514, trunk/LayoutTests/fullscreen/resources/green.html) (0 => 128902)


--- branches/chromium/1229/LayoutTests/fullscreen/resources/green.html	                        (rev 0)
+++ branches/chromium/1229/LayoutTests/fullscreen/resources/green.html	2012-09-18 16:51:26 UTC (rev 128902)
@@ -0,0 +1,8 @@
+<html>
+  <style>
+    body {
+      background-color: green;
+    }
+  </style>
+  <body></body>
+</html>

Modified: branches/chromium/1229/Source/WebCore/css/fullscreen.css (128901 => 128902)


--- branches/chromium/1229/Source/WebCore/css/fullscreen.css	2012-09-18 16:21:10 UTC (rev 128901)
+++ branches/chromium/1229/Source/WebCore/css/fullscreen.css	2012-09-18 16:51:26 UTC (rev 128902)
@@ -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;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to