2011-05-08 Jeremy Noble <jer.noble@apple.com>
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 May 2011 00:25:55 +0000 (00:25 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 May 2011 00:25:55 +0000 (00:25 +0000)
        Reviewed by Dan Bernstein.

        Full-screen video disappears behind black screen with scrollbar, followed by crash at jerryseinfeld.com
        https://bugs.webkit.org/show_bug.cgi?id=60449

        * fullscreen/full-screen-remove-sibling-expected.txt: Added.
        * fullscreen/full-screen-remove-sibling.html: Added.
2011-05-08  Jeremy Noble  <jer.noble@apple.com>

        Reviewed by Dan Bernstein.

        Full-screen video disappears behind black screen with scrollbar, followed by crash at jerryseinfeld.com
        https://bugs.webkit.org/show_bug.cgi?id=60449

        Make RenderFullScreen a non-anonymous block, so that it does not get deleted when a parent attempts to
        coalesce anonymous children.

        Test: fullscreen/full-screen-remove-sibling.html

        * rendering/RenderObject.h:
        (WebCore::RenderObject::isAnonymousBlock):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86109 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fullscreen/full-screen-remove-sibling-expected.txt [new file with mode: 0644]
LayoutTests/fullscreen/full-screen-remove-sibling.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.h

index 7a105c7..586dcc3 100644 (file)
@@ -1,3 +1,13 @@
+2011-05-08  Jeremy Noble  <jer.noble@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Full-screen video disappears behind black screen with scrollbar, followed by crash at jerryseinfeld.com
+        https://bugs.webkit.org/show_bug.cgi?id=60449
+
+        * fullscreen/full-screen-remove-sibling-expected.txt: Added.
+        * fullscreen/full-screen-remove-sibling.html: Added.
+
 2011-05-09  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/fullscreen/full-screen-remove-sibling-expected.txt b/LayoutTests/fullscreen/full-screen-remove-sibling-expected.txt
new file mode 100644 (file)
index 0000000..74562ac
--- /dev/null
@@ -0,0 +1,3 @@
+EVENT(webkitfullscreenchange)
+END OF TEST
+
diff --git a/LayoutTests/fullscreen/full-screen-remove-sibling.html b/LayoutTests/fullscreen/full-screen-remove-sibling.html
new file mode 100644 (file)
index 0000000..ae1bafc
--- /dev/null
@@ -0,0 +1,27 @@
+<body>
+<script src="full-screen-test.js"></script>
+<div id="one">
+    <div id="fullscreen"></div>
+    <div id="two"><span></span></div>
+</div>
+
+<script>
+// Bail out early if the full screen API is not enabled or is missing:
+if (Element.prototype.webkitRequestFullScreen == undefined) {
+    logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
+    endTest();
+} else {
+    var callback;
+    waitForEvent(document, 'webkitfullscreenchange', function() {
+        var one = document.getElementById('one');
+        var two = document.getElementById('two');
+        one.removeChild(two);
+        endTest();
+    });
+
+    function goFullScreen() {
+        document.getElementById('fullscreen').webkitRequestFullScreen();
+    }
+    runWithKeyDown(goFullScreen);
+}
+</script>
\ No newline at end of file
index bb9b493..b083061 100644 (file)
@@ -1,3 +1,18 @@
+2011-05-08  Jeremy Noble  <jer.noble@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Full-screen video disappears behind black screen with scrollbar, followed by crash at jerryseinfeld.com
+        https://bugs.webkit.org/show_bug.cgi?id=60449
+
+        Make RenderFullScreen a non-anonymous block, so that it does not get deleted when a parent attempts to 
+        coalesce anonymous children.
+
+        Test: fullscreen/full-screen-remove-sibling.html
+
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isAnonymousBlock):
+
 2011-05-09  Jeremy Noble  <jer.noble@apple.com>
 
         Reviewed by Simon Fraser.
index b2f1bdd..537f08a 100644 (file)
@@ -399,7 +399,11 @@ public:
         // RenderBlock::createAnonymousBlock(). This includes creating an anonymous
         // RenderBlock having a BLOCK or BOX display. Other classes such as RenderTextFragment
         // are not RenderBlocks and will return false. See https://bugs.webkit.org/show_bug.cgi?id=56709. 
-        return m_isAnonymous && (style()->display() == BLOCK || style()->display() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMarker();
+        return m_isAnonymous && (style()->display() == BLOCK || style()->display() == BOX) && style()->styleType() == NOPSEUDO && isRenderBlock() && !isListMarker()
+#if ENABLE(FULLSCREEN_API)
+            && !isRenderFullScreen()
+#endif
+            ;
     }
     bool isAnonymousColumnsBlock() const { return style()->specifiesColumns() && isAnonymousBlock(); }
     bool isAnonymousColumnSpanBlock() const { return style()->columnSpan() && isAnonymousBlock(); }