[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:47:15 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit c2e038e2469c2d5d0d1aa0af9d52ffab7b0973e7
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 27 06:24:42 2010 +0000
2010-09-26 Jenn Braithwaite <jennb at chromium.org>
Reviewed by Adam Barth.
GTK client needs updating when live iframe element is moved
between pages.
https://bugs.webkit.org/show_bug.cgi?id=46300
This test case fails on mac (see related bug 44713), which will
be fixed in a separate patch.
* fast/frames/iframe-reparenting-adopt-node-expected.txt: Added.
* fast/frames/iframe-reparenting-adopt-node.html: Added.
* fast/frames/resources/iframe-reparenting-adopt-node-iframe-content.html: Added.
* fast/frames/resources/iframe-reparenting-adopt-node-new-page.html: Added.
* platform/mac/Skipped:
2010-09-26 Jenn Braithwaite <jennb at chromium.org>
Reviewed by Adam Barth.
GTK client needs updating when live iframe element is moved
between pages.
https://bugs.webkit.org/show_bug.cgi?id=46300
Test: fast/frames/iframe-reparenting-adopt-node.html
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::didTransferChildFrameToNewDocument):
Update the webView for the frame to match the parent frame's
webView.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1a13050..c04b2b1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-26 Jenn Braithwaite <jennb at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ GTK client needs updating when live iframe element is moved
+ between pages.
+ https://bugs.webkit.org/show_bug.cgi?id=46300
+
+ This test case fails on mac (see related bug 44713), which will
+ be fixed in a separate patch.
+
+ * fast/frames/iframe-reparenting-adopt-node-expected.txt: Added.
+ * fast/frames/iframe-reparenting-adopt-node.html: Added.
+ * fast/frames/resources/iframe-reparenting-adopt-node-iframe-content.html: Added.
+ * fast/frames/resources/iframe-reparenting-adopt-node-new-page.html: Added.
+ * platform/mac/Skipped:
+
2010-09-26 Victor Wang <victorw at chromium.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/frames/iframe-reparenting-adopt-node-expected.txt b/LayoutTests/fast/frames/iframe-reparenting-adopt-node-expected.txt
new file mode 100644
index 0000000..d23268c
--- /dev/null
+++ b/LayoutTests/fast/frames/iframe-reparenting-adopt-node-expected.txt
@@ -0,0 +1,8 @@
+This test adopts an iframe from a different page into this one, closes the page that originally contained the iframe, then reloads the iframe to verify that there are no remaining dependencies on the closed page.
+
+Loaded window 2.
+Adopted iframe to first page.
+Closing window 2.
+Window 2 closed.
+PASS: iframe reloaded.
+
diff --git a/LayoutTests/fast/frames/iframe-reparenting-adopt-node.html b/LayoutTests/fast/frames/iframe-reparenting-adopt-node.html
new file mode 100644
index 0000000..6995e2d
--- /dev/null
+++ b/LayoutTests/fast/frames/iframe-reparenting-adopt-node.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<script>
+var window2, iframe;
+
+function log(message)
+{
+ document.getElementById("log").innerText += message + "\n";
+}
+
+function reallyFinish()
+{
+ log("PASS: iframe reloaded.");
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+
+function window2Unloaded()
+{
+ log("Window 2 closed.");
+
+ // Reload the iframe to demonstrate that it no longer
+ // depends on its original window.
+ iframe.onload = reallyFinish;
+ iframe.contentDocument.location.reload(true);
+}
+
+function finish()
+{
+ log("Closing window 2.");
+ window2.onunload = window2Unloaded;
+ window2.close();
+}
+
+function window2Loaded()
+{
+ log("Loaded window 2.");
+ iframe = window2.document.getElementById("iframe");
+ window.document.adoptNode(iframe);
+ window.document.body.appendChild(iframe);
+ log("Adopted iframe to first page.");
+
+ // Start the iframe's timer to call finish() to end the test.
+ iframe.contentWindow.startFinishTimer();
+}
+
+function test()
+{
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ layoutTestController.setCanOpenWindows();
+ }
+
+ window2 = window.open("resources/iframe-reparenting-adopt-node-new-page.html");
+ window2.addEventListener("load", window2Loaded, false);
+}
+</script>
+<body onload="test()">
+<p>This test adopts an iframe from a different page into this one,
+closes the page that originally contained the iframe, then reloads
+the iframe to verify that there are no remaining dependencies
+on the closed page.</p>
+<pre id=log></pre>
+</body>
+</html>
diff --git a/LayoutTests/fast/frames/resources/iframe-reparenting-adopt-node-iframe-content.html b/LayoutTests/fast/frames/resources/iframe-reparenting-adopt-node-iframe-content.html
new file mode 100644
index 0000000..af073ca
--- /dev/null
+++ b/LayoutTests/fast/frames/resources/iframe-reparenting-adopt-node-iframe-content.html
@@ -0,0 +1,7 @@
+<script>
+startFinishTimer = function()
+{
+ setTimeout(parent.parent.finish, 0);
+}
+</script>
+<body>
diff --git a/LayoutTests/fast/frames/resources/iframe-reparenting-adopt-node-new-page.html b/LayoutTests/fast/frames/resources/iframe-reparenting-adopt-node-new-page.html
new file mode 100644
index 0000000..dc8c0f0
--- /dev/null
+++ b/LayoutTests/fast/frames/resources/iframe-reparenting-adopt-node-new-page.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+A New Page<br>
+<iframe id="iframe" src="iframe-reparenting-adopt-node-iframe-content.html"></iframe>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 420790c..a010edc 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -317,3 +317,6 @@ media/context-menu-actions.html
# FileSystem API is not supported.
fast/filesystem
+
+# https://bugs.webkit.org/show_bug.cgi?id=44713
+fast/frames/iframe-reparenting-adopt-node.html
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 1a46f23..e0c32b8 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-26 Jenn Braithwaite <jennb at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ GTK client needs updating when live iframe element is moved
+ between pages.
+ https://bugs.webkit.org/show_bug.cgi?id=46300
+
+ Test: fast/frames/iframe-reparenting-adopt-node.html
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::didTransferChildFrameToNewDocument):
+ Update the webView for the frame to match the parent frame's
+ webView.
+
2010-09-24 Martin Robinson <mrobinson at igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 93b4cc2..5281351 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -603,6 +603,19 @@ PassRefPtr<Frame> FrameLoaderClient::createFrame(const KURL& url, const String&
void FrameLoaderClient::didTransferChildFrameToNewDocument()
{
+ ASSERT(m_frame);
+
+ // Update the frame's webview to the new parent's webview.
+ Frame* coreFrame = core(m_frame);
+ WebKitWebView* webView = getViewFromFrame(m_frame);
+
+ Frame* parentCoreFrame = coreFrame->tree()->parent();
+ WebKitWebFrame* parentKitFrame = kit(parentCoreFrame);
+ WebKitWebView* parentWebView = getViewFromFrame(parentKitFrame);
+ if (webView != parentWebView)
+ m_frame->priv->webView = parentWebView;
+
+ ASSERT(core(getViewFromFrame(m_frame)) == coreFrame->page());
}
void FrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list