Title: [95819] branches/chromium/874
Revision
95819
Author
[email protected]
Date
2011-09-23 09:41:51 -0700 (Fri, 23 Sep 2011)

Log Message

Merge 95059 - Source/WebCore: Fix crash when an iframe element is removed during a transition to
fullscreen.
BUG=95639
Review URL: http://codereview.chromium.org/8018005

Modified Paths

Added Paths

Diff

Copied: branches/chromium/874/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition-expected.txt (from rev 95059, trunk/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition-expected.txt) (0 => 95819)


--- branches/chromium/874/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition-expected.txt	                        (rev 0)
+++ branches/chromium/874/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition-expected.txt	2011-09-23 16:41:51 UTC (rev 95819)
@@ -0,0 +1 @@
+PASS

Copied: branches/chromium/874/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition.html (from rev 95059, trunk/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition.html) (0 => 95819)


--- branches/chromium/874/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition.html	                        (rev 0)
+++ branches/chromium/874/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition.html	2011-09-23 16:41:51 UTC (rev 95819)
@@ -0,0 +1,43 @@
+<script src=""
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+function runWithKeyDown(fn)
+{
+    document.addEventListener('mousedown', function() { fn(); }, false);
+    if (window.layoutTestController) {
+        eventSender.mouseDown();
+    }
+}
+
+function init() {
+    // Bail out early if the full screen API is not enabled or is missing:
+    if (Element.prototype.webkitRequestFullScreen == undefined) {
+        alert("Fullscreen API not available.");
+    } else {
+        runWithKeyDown(goFullScreen);
+    }
+}
+
+function goFullScreen() {
+    var iframe = document.getElementById('block1');
+    var element = iframe.contentDocument.documentElement;
+    setTimeout(function () {
+        iframe.parentNode.removeChild(iframe);
+        gc();
+        setTimeout(function () {
+            if (window.layoutTestController) {
+                layoutTestController.notifyDone();
+            }
+        }, 0);
+    }, 0);
+    element.webkitRequestFullScreen();
+}
+</script>
+<body _onload_="init()">
+    <iframe webkitallowfullscreen src="" id="block1"></iframe>
+    PASS
+</body>

Modified: branches/chromium/874/Source/WebCore/dom/Document.cpp (95818 => 95819)


--- branches/chromium/874/Source/WebCore/dom/Document.cpp	2011-09-23 16:39:31 UTC (rev 95818)
+++ branches/chromium/874/Source/WebCore/dom/Document.cpp	2011-09-23 16:41:51 UTC (rev 95819)
@@ -574,6 +574,10 @@
             (*m_userSheets)[i]->clearOwnerNode();
     }
 
+#if ENABLE(FULLSCREEN_API)
+    m_fullScreenChangeEventTargetQueue.clear();
+#endif
+
     deleteRetiredCustomFonts();
 
     m_weakReference->clear();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to