[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
andersca at apple.com
andersca at apple.com
Wed Apr 7 23:27:51 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit f9628c0cb1ecdac898d6761f7e36d7d84a97a76d
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 10 00:46:37 2009 +0000
WebCore: <rdar://problem/7328395>
https://bugs.webkit.org/show_bug.cgi?id=31277
Reviewed by Darin Adler and Dan Bernstein.
When an object tag's style changes (for example when child nodes are added/removed),
reuse its Frame (if it has one) instead of creating multiple Frames.
Test: fast/dom/HTMLObjectElement/children-changed.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::requestObject):
LayoutTests: <rdar://problem/7328395>
https://bugs.webkit.org/show_bug.cgi?id=31277
Reviewed by Darin Adler and Dan Bernstein.
When an object tag's style changes (for example when child nodes are added/removed),
reuse its Frame (if it has one) instead of creating multiple Frames.
* fast/dom/HTMLObjectElement/children-changed-expected.txt: Added.
* fast/dom/HTMLObjectElement/children-changed.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2c44e19..9404c67 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-11-09 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Darin Adler and Dan Bernstein.
+
+ <rdar://problem/7328395>
+ https://bugs.webkit.org/show_bug.cgi?id=31277
+
+ When an object tag's style changes (for example when child nodes are added/removed),
+ reuse its Frame (if it has one) instead of creating multiple Frames.
+
+ * fast/dom/HTMLObjectElement/children-changed-expected.txt: Added.
+ * fast/dom/HTMLObjectElement/children-changed.html: Added.
+
2009-11-09 Yael Aharon <yael.aharon at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/LayoutTests/fast/dom/HTMLObjectElement/children-changed-expected.txt b/LayoutTests/fast/dom/HTMLObjectElement/children-changed-expected.txt
new file mode 100644
index 0000000..fdac5c3
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLObjectElement/children-changed-expected.txt
@@ -0,0 +1,3 @@
+This tests that adding a child node with only whitespace to an object tag does not create a new subframe, causing an assert.
+SUCCESS!
+
diff --git a/LayoutTests/fast/dom/HTMLObjectElement/children-changed.html b/LayoutTests/fast/dom/HTMLObjectElement/children-changed.html
new file mode 100644
index 0000000..3055a95
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLObjectElement/children-changed.html
@@ -0,0 +1,21 @@
+<html>
+<script>
+function runTest() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ }
+ document.getElementById('a').textContent = ' ';
+ setTimeout(function() {
+ document.getElementById('result').innerHTML = "SUCCESS!";
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }, 10);
+
+}
+</script>
+<body onload="runTest()">
+<div>This tests that adding a child node with only whitespace to an object tag does not create a new subframe, causing an assert.</div>
+<div id="result">FAILURE</div>
+<object id="a" data="1"/></object>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d74ddd0..c32b001 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-11-09 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Darin Adler and Dan Bernstein.
+
+ <rdar://problem/7328395>
+ https://bugs.webkit.org/show_bug.cgi?id=31277
+
+ When an object tag's style changes (for example when child nodes are added/removed),
+ reuse its Frame (if it has one) instead of creating multiple Frames.
+
+ Test: fast/dom/HTMLObjectElement/children-changed.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestObject):
+
2009-11-09 Norbert Leser <norbert.leser at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 9e52666..7713371 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -1260,9 +1260,11 @@ bool FrameLoader::requestObject(RenderPart* renderer, const String& url, const A
ASSERT(renderer->node()->hasTagName(objectTag) || renderer->node()->hasTagName(embedTag));
HTMLPlugInElement* element = static_cast<HTMLPlugInElement*>(renderer->node());
-
- // FIXME: OK to always make a new frame? When does the old frame get removed?
- return loadSubframe(element, completedURL, frameName, m_outgoingReferrer);
+
+ // If the plug-in element already contains a subframe, requestFrame will re-use it. Otherwise,
+ // it will create a new frame and set it as the RenderPart's widget, causing what was previously
+ // in the widget to be torn down.
+ return requestFrame(element, completedURL, frameName);
}
bool FrameLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list