Fixed: <rdar://problem/4026639> www.bmw.ca configurator does not work with Safari
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Feb 2005 21:16:54 +0000 (21:16 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Feb 2005 21:16:54 +0000 (21:16 +0000)
        Reviewed by john.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::tryGet): when frameset.<name of frame child> is called, return the window object of the frame child

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8717 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_html.cpp

index ea17919815edc0e88bb57a340fdc6a138c524ba3..5831bf548fd60bce557e52a146a1fff0a88c2afe 100644 (file)
@@ -1,3 +1,12 @@
+2005-02-28  Chris Blumenberg  <cblu@apple.com>
+
+       Fixed: <rdar://problem/4026639> www.bmw.ca configurator does not work with Safari
+
+        Reviewed by john.
+
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLElement::tryGet): when frameset.<name of frame child> is called, return the window object of the frame child
+
 2005-02-28  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Chris
index e860967412860a9e55cd88ce1e5443a599e62717..da414a21f27558d0ec5a48b5bb93701a6e4af261 100644 (file)
@@ -1151,6 +1151,22 @@ Value KJS::HTMLElement::tryGet(ExecState *exec, const Identifier &propertyName)
         return getDOMNode(exec,select.options().item(u)); // not specified by DOM(?) but supported in netscape/IE
     }
       break;
+    case ID_FRAMESET: {
+        DOM::Node frame = element.children().namedItem(propertyName.string());
+        if (!frame.isNull() && frame.elementId() == ID_FRAME) {
+            DOM::DocumentImpl* doc = static_cast<DOM::HTMLFrameElementImpl *>(frame.handle())->contentDocument();
+            if (doc) {
+                KHTMLPart* part = doc->part();
+                if (part) {
+                    Window *window = Window::retrieveWindow(part);
+                    if (window) {
+                        return Value(window);
+                    }
+                }
+            }
+        }
+    }
+        break;
     case ID_FRAME:
     case ID_IFRAME: {
         DOM::DocumentImpl* doc = static_cast<DOM::HTMLFrameElementImpl *>(element.handle())->contentDocument();