[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
abarth at webkit.org
abarth at webkit.org
Wed Dec 22 12:08:05 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2d2d71bd598471e347ff4395434f94007bd7c505
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 16 08:04:17 2010 +0000
2010-08-16 Adam Barth <abarth at webkit.org>
Reviewed by Alexey Proskuryakov.
HTML5 fragment parsing doesn't load iframes
https://bugs.webkit.org/show_bug.cgi?id=44038
Test that iframes created in detached documents actually get loaded
when they're adopted into attached documents (or, rather, when they're
inserted into the DOM).
* fast/frames/adopt-from-created-document-expected.txt: Added.
* fast/frames/adopt-from-created-document.html: Added.
2010-08-16 Adam Barth <abarth at webkit.org>
Reviewed by Alexey Proskuryakov.
HTML5 fragment parsing doesn't load iframes
https://bugs.webkit.org/show_bug.cgi?id=44038
Previously, this code assumed that every source iframe was actually
attached to a render tree. It tried to "keep the iframe alive" as it
moved documents. However, if the iframe wasn't attached to begin with,
it was never "alive," so trying to keep a dead iframe alive lead to a
... zombie iframe.
Test: fast/frames/adopt-from-created-document.html
* dom/Document.cpp:
(WebCore::Document::adoptNode):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ef19ff1..262a976 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-16 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ HTML5 fragment parsing doesn't load iframes
+ https://bugs.webkit.org/show_bug.cgi?id=44038
+
+ Test that iframes created in detached documents actually get loaded
+ when they're adopted into attached documents (or, rather, when they're
+ inserted into the DOM).
+
+ * fast/frames/adopt-from-created-document-expected.txt: Added.
+ * fast/frames/adopt-from-created-document.html: Added.
+
2010-08-13 MORITA Hajime <morrita at google.com>
Reviewed by Tony Chang.
diff --git a/LayoutTests/fast/frames/adopt-from-created-document-expected.txt b/LayoutTests/fast/frames/adopt-from-created-document-expected.txt
new file mode 100644
index 0000000..1c74ccd
--- /dev/null
+++ b/LayoutTests/fast/frames/adopt-from-created-document-expected.txt
@@ -0,0 +1,8 @@
+ALERT: 1
+ALERT: 2
+ALERT: 3
+ALERT: 4
+ALERT: 5
+ALERT: 6
+ALERT: 7
+
diff --git a/LayoutTests/fast/frames/adopt-from-created-document.html b/LayoutTests/fast/frames/adopt-from-created-document.html
new file mode 100644
index 0000000..1abc97b
--- /dev/null
+++ b/LayoutTests/fast/frames/adopt-from-created-document.html
@@ -0,0 +1,17 @@
+<body>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+alert(1);
+var doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null);
+alert(2);
+var ifr = doc.createElement('iframe');
+alert(3);
+ifr.setAttribute('src', 'javascript:alert(6)');
+alert(4);
+var adopted = document.adoptNode(ifr)
+alert(5);
+document.body.appendChild(adopted);
+alert(7);
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9d1d247..8aebf51 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-16 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ HTML5 fragment parsing doesn't load iframes
+ https://bugs.webkit.org/show_bug.cgi?id=44038
+
+ Previously, this code assumed that every source iframe was actually
+ attached to a render tree. It tried to "keep the iframe alive" as it
+ moved documents. However, if the iframe wasn't attached to begin with,
+ it was never "alive," so trying to keep a dead iframe alive lead to a
+ ... zombie iframe.
+
+ Test: fast/frames/adopt-from-created-document.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::adoptNode):
+
2010-08-13 MORITA Hajime <morrita at google.com>
Reviewed by Tony Chang.
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 59b7d6d..e91a9ac 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -830,7 +830,7 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionCode& ec)
}
default:
if (source->hasTagName(iframeTag))
- static_cast<HTMLIFrameElement*>(source.get())->setRemainsAliveOnRemovalFromTree(attached());
+ static_cast<HTMLIFrameElement*>(source.get())->setRemainsAliveOnRemovalFromTree(attached() && source->attached());
if (source->parentNode())
source->parentNode()->removeChild(source.get(), ec);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list