Reviewed by Mitz.
<rdar://problem/
5280532>
REGRESSION: Can't access nested embed by document.name if object is not immediate parent
* plugins/embed-inside-object-expected.txt: Added.
* plugins/embed-inside-object.html: Added.
WebCore:
Reviewed by Mitz.
<rdar://problem/
5280532>
REGRESSION: Can't access nested embed by document.name if object is not immediate parent
Traverse up the tree looking for an object element.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::getInstance):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24068
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-07-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mitz.
+
+ <rdar://problem/5280532>
+ REGRESSION: Can't access nested embed by document.name if object is not immediate parent
+
+ * plugins/embed-inside-object-expected.txt: Added.
+ * plugins/embed-inside-object.html: Added.
+
2007-07-06 Adam Roben <aroben@apple.com>
Add another Leopard failure
--- /dev/null
+
+This tests that it's possible to control an embed that is nested inside an object with a span tag in between.
+plugin object is: [object HTMLEmbedElement]
+SUCCESS
+
--- /dev/null
+<html>
+<script>
+ function debug(str) {
+ document.getElementById('console').innerHTML += str + "<br>";
+ }
+
+ function pluginCallback() {
+ debug('SUCCESS');
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ function runTest() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ }
+
+ var plugin = document.plugin;
+
+ debug('plugin object is: ' + plugin);
+ plugin.getURL('javascript:pluginCallback()', '_self')
+ }
+</script>
+<body onload="runTest()">
+<object name="plugin" type="application/x-webkit-test-netscape">
+ <span>
+ <embed name="plugin" type="application/x-webkit-test-netscape"></embed>
+ </span>
+</object>
+<div>
+ This tests that it's possible to control an embed that is nested inside an object with a span tag in between.
+</div>
+<div id="console">
+</div>
+</body>
+</html>
+2007-07-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mitz.
+
+ <rdar://problem/5280532>
+ REGRESSION: Can't access nested embed by document.name if object is not immediate parent
+
+ Traverse up the tree looking for an object element.
+
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::getInstance):
+
2007-07-06 George Staikos <staikos@kde.org>
Qt build fix: Don't clobber qmake variables that are already set.
RenderObject *r = renderer();
if (!r) {
Node *p = parentNode();
- if (p && p->hasTagName(objectTag))
- r = p->renderer();
+
+ while (p) {
+ if (p->hasTagName(objectTag)) {
+ r = p->renderer();
+ break;
+ }
+
+ p = p->parentNode();
+ }
}
if (r && r->isWidget()) {