Reviewed by John.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2005 16:30:28 +0000 (16:30 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2005 16:30:28 +0000 (16:30 +0000)
        - fixed <rdar://problem/4091082> Google Suggest no longer works due to lack of "frameElement"

        * khtml/ecma/kjs_window.h: Added FrameElement.
        * khtml/ecma/kjs_window.cpp: (Window::get): Added "frameElement".
        * khtml/ecma/kjs_window.lut.h: Regenerated.

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_window.cpp
WebCore/khtml/ecma/kjs_window.h
WebCore/khtml/ecma/kjs_window.lut.h

index ebefa8317bb6dacdc65534ba7473d907174d0202..fef2a0ec948c63126c3112c2d215455d772dccb5 100644 (file)
@@ -1,3 +1,13 @@
+2005-04-22  Darin Adler  <darin@apple.com>
+
+        Reviewed by John.
+
+        - fixed <rdar://problem/4091082> Google Suggest no longer works due to lack of "frameElement"
+
+        * khtml/ecma/kjs_window.h: Added FrameElement.
+        * khtml/ecma/kjs_window.cpp: (Window::get): Added "frameElement".
+        * khtml/ecma/kjs_window.lut.h: Regenerated.
+
 2005-04-22  Darin Adler  <darin@apple.com>
 
         Reviewed by John.
index 1b6380ad99f81a641050ce08630827d407e61e29..06879cb7014640188befde4c82a86c4ad71d8e7e 100644 (file)
@@ -66,6 +66,7 @@
 
 using DOM::DocumentImpl;
 using DOM::DOMString;
+using DOM::ElementImpl;
 using DOM::Node;
 using DOM::Position;
 using khtml::TypingCommand;
@@ -291,6 +292,7 @@ const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
   onselect     Window::Onselect        DontDelete
   onsubmit     Window::Onsubmit        DontDelete
   onunload     Window::Onunload        DontDelete
+  frameElement  Window::FrameElement    DontDelete|ReadOnly
 @end
 */
 IMPLEMENT_PROTOFUNC(WindowFunc)
@@ -824,6 +826,15 @@ Value Window::get(ExecState *exec, const Identifier &p) const
         return getListener(exec,DOM::EventImpl::UNLOAD_EVENT);
       else
         return Undefined();
+    case FrameElement: {
+        DocumentImpl *document = m_part->xmlDocImpl();
+        if (!document)
+            return Undefined();
+        ElementImpl *frameElement = document->ownerElement();
+        if (!frameElement)
+            return Undefined();
+        return Value(frameElement);
+    }
     }
   }
 
index 848ce57c5d59c0d1e9d3a1b862d604f9d5f843da..07d0adbbfa6d1dc615d492efffd82d9ba5358497 100644 (file)
@@ -142,7 +142,7 @@ namespace KJS {
           Onfocus, Onkeydown, Onkeypress, Onkeyup, Onload, Onmousedown, Onmousemove,
            Onmouseout, Onmouseover, Onmouseup, Onmove, Onreset, Onresize, Onscroll, Onsearch,
            Onselect, Onsubmit, Onunload,
-           Statusbar, Toolbar };
+           Statusbar, Toolbar, FrameElement };
   protected:
     Value getListener(ExecState *exec, int eventId) const;
     void setListener(ExecState *exec, int eventId, Value func);
index 053bf7c1004589e71a08d6d7519bfd3dc2761f91..5db7ae8907dad921ab1b743fa937033322b49fb5 100644 (file)
@@ -76,7 +76,7 @@ const struct HashEntry WindowTableEntries[] = {
    { "innerWidth", Window::InnerWidth, DontDelete|ReadOnly, 0, &WindowTableEntries[119] },
    { "defaultstatus", Window::DefaultStatus, DontDelete, 0, 0 },
    { "name", Window::Name, DontDelete, 0, 0 },
-   { 0, 0, 0, 0, 0 },
+   { "frameElement", Window::FrameElement, DontDelete|ReadOnly, 0, 0 },
    { "offscreenBuffering", Window::OffscreenBuffering, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
    { "onscroll", Window::Onscroll, DontDelete, 0, 0 },