Commit da4d5df9 authored by zecke's avatar zecke

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
parent 72037259
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:
2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Adam.
......@@ -848,6 +848,7 @@ gdk-port {
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 @@ gdk-port {
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 \
......
......@@ -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"
......
......@@ -37,8 +37,6 @@ typedef struct _WebKitGtkFrame WebKitGtkFrame;
namespace WebCore {
class FrameGdk;
class FrameLoaderClientGdk : public FrameLoaderClient {
public:
FrameLoaderClientGdk(WebKitGtkFrame*);
......
/*
* 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;
namespace WebCore {
void Frame::issueTransposeCommand()
{
notImplemented();
}
class FrameGdk : public Frame {
public:
FrameGdk(Page*, HTMLFrameOwnerElement*, FrameLoaderClientGdk*);
virtual ~FrameGdk();
void Frame::cleanupPlatformScriptObjects()
{
notImplemented();
}
void dumpRenderTree() const;
};
DragImageRef Frame::dragImageForSelection()
{
notImplemented();
return 0;
}
void Frame::dashboardRegionsChanged()
{
notImplemented();
}
#endif
void Frame::setNeedsReapplyStyles()
{
notImplemented();
}
}
/*
* 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();
}
}
......@@ -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 @@ String FileChooser::basenameForWidth(const Font&, int width) const { notImplemen
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; }
......
......@@ -31,7 +31,6 @@
#include "Cursor.h"
#include "Font.h"
#include "FrameGdk.h"
#include "GraphicsContext.h"
#include "IntRect.h"
#include "RenderObject.h"
......
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:
2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Adam.
......
......@@ -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 @@ G_DEFINE_TYPE(WebKitGtkFrame, webkit_gtk_frame, G_TYPE_OBJECT)
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 @@ GObject* webkit_gtk_frame_new(WebKitGtkPage* page)
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);
......
......@@ -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 @@ extern "C" {
#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;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment