WebCore:
2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Kill class FrameGdk and move the stubs to page/gdk/FrameGdk.cpp and the
        remainings into WebKitGtkFrame.
        The DRT functionality of class FrameGdk is currently lost.

        * WebCore.pro:
        * loader/gdk/FrameLoaderClientGdk.cpp:
        * loader/gdk/FrameLoaderClientGdk.h:
        * page/gdk/FrameGdk.cpp: Renamed from WebCore/platform/gdk/FrameGdk.cpp.
        (WebCore::Frame::issueTransposeCommand):
        (WebCore::Frame::cleanupPlatformScriptObjects):
        (WebCore::Frame::dragImageForSelection):
        (WebCore::Frame::dashboardRegionsChanged):
        * platform/gdk/FrameGdk.h: Removed.
        * platform/gdk/TemporaryLinkStubs.cpp: Removed Frame stub, added the loadResourceIntoArray stub
        * platform/gdk/WidgetGdk.cpp:

WebKit:
2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Moved code from class FrameGdk into WebKitGtkFrame. Update the
        webkitgrkprivate.h header file to not include FrameGdk.h.

        * gtk/Api/webkitgtkframe.cpp:
        * gtk/Api/webkitgtkprivate.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 945c102..f3938f6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,26 @@
 
         Reviewed by Adam.
 
+        Kill class FrameGdk and move the stubs to page/gdk/FrameGdk.cpp and the
+        remainings into WebKitGtkFrame.
+        The DRT functionality of class FrameGdk is currently lost.
+
+        * WebCore.pro:
+        * loader/gdk/FrameLoaderClientGdk.cpp:
+        * loader/gdk/FrameLoaderClientGdk.h:
+        * page/gdk/FrameGdk.cpp: Renamed from WebCore/platform/gdk/FrameGdk.cpp.
+        (WebCore::Frame::issueTransposeCommand):
+        (WebCore::Frame::cleanupPlatformScriptObjects):
+        (WebCore::Frame::dragImageForSelection):
+        (WebCore::Frame::dashboardRegionsChanged):
+        * platform/gdk/FrameGdk.h: Removed.
+        * platform/gdk/TemporaryLinkStubs.cpp: Removed Frame stub, added the loadResourceIntoArray stub
+        * platform/gdk/WidgetGdk.cpp:
+
+2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>
+
+        Reviewed by Adam.
+
         Remove the event handling code and move it to WebKit/gtk/Api/webkitgtkpage.cpp
 
         * platform/gdk/FrameGdk.cpp:
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 115f22c..28bedb1 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -848,6 +848,7 @@
         platform/TextCodecICU.cpp \
         platform/TextBreakIteratorICU.cpp \
         page/gdk/EventHandlerGdk.cpp \
+        page/gdk/FrameGdk.cpp \
         page/gdk/ContextMenuClientGdk.cpp \
         page/gdk/DragControllerGdk.cpp \
         page/gdk/InspectorClientGdk.cpp \
@@ -862,7 +863,6 @@
         platform/gdk/FontDataGdk.cpp \
         platform/gdk/FontGdk.cpp \
         platform/gdk/FontPlatformDataGdk.cpp \
-        platform/gdk/FrameGdk.cpp \
         platform/gdk/GlyphPageTreeNodeGdk.cpp \
         platform/gdk/KeyEventGdk.cpp \
         platform/gdk/LoggingGdk.cpp \
diff --git a/WebCore/loader/gdk/FrameLoaderClientGdk.cpp b/WebCore/loader/gdk/FrameLoaderClientGdk.cpp
index 8cf33c1..ae2dbc6 100644
--- a/WebCore/loader/gdk/FrameLoaderClientGdk.cpp
+++ b/WebCore/loader/gdk/FrameLoaderClientGdk.cpp
@@ -33,7 +33,6 @@
 #include "config.h"
 #include "FrameLoaderClientGdk.h"
 #include "DocumentLoader.h"
-#include "FrameGdk.h"
 #include "FrameLoader.h"
 #include "MIMETypeRegistry.h"
 #include "NotImplemented.h"
diff --git a/WebCore/loader/gdk/FrameLoaderClientGdk.h b/WebCore/loader/gdk/FrameLoaderClientGdk.h
index b57bb28..60d49e2 100644
--- a/WebCore/loader/gdk/FrameLoaderClientGdk.h
+++ b/WebCore/loader/gdk/FrameLoaderClientGdk.h
@@ -37,8 +37,6 @@
 
 namespace WebCore {
 
-    class FrameGdk;
-
     class FrameLoaderClientGdk : public FrameLoaderClient {
     public:
         FrameLoaderClientGdk(WebKitGtkFrame*);
diff --git a/WebCore/platform/gdk/FrameGdk.h b/WebCore/page/gdk/FrameGdk.cpp
similarity index 76%
rename from WebCore/platform/gdk/FrameGdk.h
rename to WebCore/page/gdk/FrameGdk.cpp
index 9d7d416..c141554 100644
--- a/WebCore/platform/gdk/FrameGdk.h
+++ b/WebCore/page/gdk/FrameGdk.cpp
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
  * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 
+ * Copyright (C) 2007 Holger Hans Peter Freyther
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,30 +26,36 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef FrameGdk_h
-#define FrameGdk_h
-
-#include "EditorClient.h"
+#include "config.h"
 #include "Frame.h"
-#include <gdk/gdk.h>
-#include "ResourceHandleClient.h"
+#include "NotImplemented.h"
+
 
 namespace WebCore {
 
-class Element;
-class FrameGdk;
-class FrameLoaderClientGdk;
-class FormData;
-
-
-class FrameGdk : public Frame {
-public:
-    FrameGdk(Page*, HTMLFrameOwnerElement*, FrameLoaderClientGdk*);
-    virtual ~FrameGdk();
-
-    void dumpRenderTree() const;
-};
-
+void Frame::issueTransposeCommand()
+{
+    notImplemented();
 }
 
-#endif
+void Frame::cleanupPlatformScriptObjects()
+{
+    notImplemented();
+}
+
+DragImageRef Frame::dragImageForSelection() 
+{
+    notImplemented();
+    return 0;
+}
+
+void Frame::dashboardRegionsChanged()
+{
+    notImplemented();
+}
+
+void Frame::setNeedsReapplyStyles()
+{
+   notImplemented(); 
+}
+}
diff --git a/WebCore/platform/gdk/FrameGdk.cpp b/WebCore/platform/gdk/FrameGdk.cpp
deleted file mode 100644
index 83285c8..0000000
--- a/WebCore/platform/gdk/FrameGdk.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
- * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 
- * Copyright (C) 2007 Holger Hans Peter Freyther
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#include "config.h"
-#include "FrameGdk.h"
-
-#include "CString.h"
-#include "Document.h"
-#include "DocumentLoader.h"
-#include "EventHandler.h"
-#include "FrameLoader.h"
-#include "FrameLoaderClientGdk.h"
-#include "FramePrivate.h"
-#include "FrameView.h"
-#include "GraphicsContext.h"
-#include "HitTestRequest.h"
-#include "HitTestResult.h"
-#include "KeyboardCodes.h"
-#include "NotImplemented.h"
-#include "Page.h"
-#include "PlatformKeyboardEvent.h"
-#include "PlatformMouseEvent.h"
-#include "PlatformString.h"
-#include "PlatformWheelEvent.h"
-#include "RenderObject.h"
-#include "RenderTreeAsText.h"
-#include "ResourceHandle.h"
-#include "ResourceResponse.h"
-#include "SelectionController.h"
-#include "Settings.h"
-#include "TypingCommand.h"
-#include "webkitgtkframe.h"
-
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
-
-// This function loads resources from WebKit
-// This does not belong here and I'm not sure where
-// it should go
-// I don't know what the plans or design is
-// for none code resources
-Vector<char> loadResourceIntoArray(const char* resourceName)
-{
-    Vector<char> resource;
-    //if (strcmp(resourceName,"missingImage") == 0) {
-    //}
-    return resource;
-}
-
-
-namespace WebCore {
-
-FrameGdk::FrameGdk(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClientGdk* frameLoader)
-    : Frame(page, ownerElement, frameLoader)
-{
-    Settings* settings = page->settings();
-    settings->setLoadsImagesAutomatically(true);
-    settings->setMinimumFontSize(5);
-    settings->setMinimumLogicalFontSize(5);
-    settings->setShouldPrintBackgrounds(true);
-    settings->setJavaScriptEnabled(true);
-
-    settings->setDefaultFixedFontSize(14);
-    settings->setDefaultFontSize(14);
-    settings->setSerifFontFamily("Times New Roman");
-    settings->setSansSerifFontFamily("Arial");
-    settings->setFixedFontFamily("Courier");
-    settings->setStandardFontFamily("Arial");
-}
-
-FrameGdk::~FrameGdk()
-{
-    loader()->cancelAndClear();
-}
-
-void FrameGdk::dumpRenderTree() const
-{
-    if (view()->needsLayout())
-        view()->layout();
-    
-    String txt = externalRepresentation(renderer());
-    CString utf8Str = txt.utf8();
-    const char *utf8 = utf8Str.data();
-    if (utf8)
-        printf("%s\n", utf8);
-    else
-        printf("FrameGdk::dumpRenderTree() no data\n");
-}
-
-void Frame::issueTransposeCommand()
-{
-    notImplemented();
-}
-
-void Frame::cleanupPlatformScriptObjects()
-{
-    notImplemented();
-}
-
-DragImageRef Frame::dragImageForSelection() 
-{
-    notImplemented();
-    return 0;
-}
-
-void Frame::dashboardRegionsChanged()
-{
-    notImplemented();
-}
-
-}
diff --git a/WebCore/platform/gdk/TemporaryLinkStubs.cpp b/WebCore/platform/gdk/TemporaryLinkStubs.cpp
index 62260b4..4ece1f8 100644
--- a/WebCore/platform/gdk/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/gdk/TemporaryLinkStubs.cpp
@@ -42,7 +42,6 @@
 #include "Editor.h"
 #include "FileChooser.h"
 #include "Font.h"
-#include "FrameGdk.h"
 #include "FrameLoadRequest.h"
 #include "FrameLoader.h"
 #include "FrameLoaderClientGdk.h"
@@ -78,6 +77,19 @@
 
 using namespace WebCore;
 
+// This function loads resources from WebKit
+// This does not belong here and I'm not sure where
+// it should go
+// I don't know what the plans or design is
+// for none code resources
+Vector<char> loadResourceIntoArray(const char* resourceName)
+{
+    Vector<char> resource;
+    //if (strcmp(resourceName,"missingImage") == 0) {
+    //}
+    return resource;
+}
+
 namespace WebCore {
     class Page;
 }
@@ -163,7 +175,6 @@
 Color WebCore::focusRingColor() { return 0xFF0000FF; }
 void WebCore::setFocusRingColorChangeFunction(void (*)()) { }
 
-void Frame::setNeedsReapplyStyles() { }
 
 bool ResourceHandle::willLoadFromCache(ResourceRequest&) { notImplemented(); return false; }
 bool ResourceHandle::loadsBlocked() { notImplemented(); return false; }
diff --git a/WebCore/platform/gdk/WidgetGdk.cpp b/WebCore/platform/gdk/WidgetGdk.cpp
index 36ba02b..ea5b5b0 100644
--- a/WebCore/platform/gdk/WidgetGdk.cpp
+++ b/WebCore/platform/gdk/WidgetGdk.cpp
@@ -31,7 +31,6 @@
 
 #include "Cursor.h"
 #include "Font.h"
-#include "FrameGdk.h"
 #include "GraphicsContext.h"
 #include "IntRect.h"
 #include "RenderObject.h"
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 315979a..9963b1f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -2,6 +2,16 @@
 
         Reviewed by Adam.
 
+        Moved code from class FrameGdk into WebKitGtkFrame. Update the
+        webkitgrkprivate.h header file to not include FrameGdk.h.
+
+        * gtk/Api/webkitgtkframe.cpp:
+        * gtk/Api/webkitgtkprivate.h:
+
+2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>
+
+        Reviewed by Adam.
+
         Change variable names to follow the Coding-Style. Replace occurences
         of a_b with aB and place the '*' correctly.
 
diff --git a/WebKit/gtk/Api/webkitgtkframe.cpp b/WebKit/gtk/Api/webkitgtkframe.cpp
index 3133076..ca12ba1 100644
--- a/WebKit/gtk/Api/webkitgtkframe.cpp
+++ b/WebKit/gtk/Api/webkitgtkframe.cpp
@@ -31,7 +31,7 @@
 #include "webkitgtkpage.h"
 #include "webkitgtkprivate.h"
 
-#include "FrameGdk.h"
+#include "FrameLoader.h"
 #include "FrameLoaderClientGdk.h"
 #include "FrameView.h"
 
@@ -61,6 +61,7 @@
 static void webkit_gtk_frame_finalize(GObject* object)
 {
     WebKitGtkFramePrivate* privateData = WEBKIT_GTK_FRAME_GET_PRIVATE(WEBKIT_GTK_FRAME(object));
+    privateData->frame->loader()->cancelAndClear();
     delete privateData->frame;
 }
 
@@ -127,7 +128,20 @@
     WebKitGtkPagePrivate* pageData = WEBKIT_GTK_PAGE_GET_PRIVATE(page);
 
     frameData->client = new FrameLoaderClientGdk(frame);
-    frameData->frame = new FrameGdk(pageData->page, 0, frameData->client);
+    frameData->frame = new Frame(pageData->page, 0, frameData->client);
+    Settings* settings = WebKitGtk::core(page)->settings();
+    settings->setLoadsImagesAutomatically(true);
+    settings->setMinimumFontSize(5);
+    settings->setMinimumLogicalFontSize(5);
+    settings->setShouldPrintBackgrounds(true);
+    settings->setJavaScriptEnabled(true);
+
+    settings->setDefaultFixedFontSize(14);
+    settings->setDefaultFontSize(14);
+    settings->setSerifFontFamily("Times New Roman");
+    settings->setSansSerifFontFamily("Arial");
+    settings->setFixedFontFamily("Courier");
+    settings->setStandardFontFamily("Arial");
 
     FrameView* frame_view = new FrameView(frameData->frame);
     frameData->frame->setView(frame_view);
diff --git a/WebKit/gtk/Api/webkitgtkprivate.h b/WebKit/gtk/Api/webkitgtkprivate.h
index a39ebdf..e22306c 100644
--- a/WebKit/gtk/Api/webkitgtkprivate.h
+++ b/WebKit/gtk/Api/webkitgtkprivate.h
@@ -44,7 +44,7 @@
 
 #include "Settings.h"
 #include "Page.h"
-#include "FrameGdk.h"
+#include "Frame.h"
 #include "FrameLoaderClientGdk.h"
 
 namespace WebKitGtk {
@@ -74,7 +74,7 @@
     #define WEBKIT_GTK_FRAME_GET_PRIVATE(obj)    (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_GTK_TYPE_FRAME, WebKitGtkFramePrivate))
     typedef struct _WebKitGtkFramePrivate WebKitGtkFramePrivate;
     struct _WebKitGtkFramePrivate {
-        WebCore::FrameGdk* frame;
+        WebCore::Frame* frame;
         WebCore::FrameLoaderClientGdk* client;
         WebKitGtkPage* page;
     };