[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:13:55 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9ac8bace6d32f3bedb53f28dc8b68347f22241bb
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue May 21 00:30:41 2002 +0000
Use more of the original khtml_part.cpp; a step in the direction of factoring
our code out so more of it can go in WebKit and we don't need external.h.
* khtml/Makefile.am:
* khtml/khtml_part.cpp:
* khtml/khtml_part.h:
* khtml/khtmlpart_p.h:
Start compiling khtml_part.cpp and using khtmlpart_p.h again.
* kwq/KWQKHTMLPart.mm:
Remove code that was identical to khtml_part.cpp. We aren't going to use the
"copy and hack our copy" approach on this class for the long termk, and this
is the first step in cleaning things up.
* khtml/khtml_ext.h: Removed.
* khtml/khtml_factory.h: Removed.
* khtml/misc/loader.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyleSelector):
Remove some APPLE_CHANGES ifdefs we don't need any more.
* kwq/KWQDateTime.mm:
Simplify things like copy constructors.
* kwq/kdeui/kcursor.h:
* kwq/KWQKCursor.mm:
Add handCursor.
* kwq/KWQKHTMLFactory.mm:
Put in real implementations, not just placeholders.
* kwq/KWQKHTMLPartBrowserExtension.mm:
* kwq/KWQKInstance.mm:
* kwq/KWQPart.mm:
* kwq/KWQbrowserextension.mm:
Empty these files out, nothing in them is needed any more.
* kwq/khtml/khtml_settings.h:
* kwq/KWQKHTMLSettings.mm:
(KHTMLSettings::isJavaEnabled):
(KHTMLSettings::autoLoadImages):
(KHTMLSettings::isPluginsEnabled):
(KHTMLSettings::isJavaScriptEnabled):
(KHTMLSettings::isJavaScriptDebugEnabled):
Moved settings here from KWQKHTMLPart.mm
* kwq/kdecore/kurl.h:
* kwq/KWQKURL.mm:
(KURL::encodedHtmlRef):
(KURL::htmlRef):
Placeholders for these two, called in KHTMLPart, but maybe not really needed.
* kwq/KWQKloader.mm:
(Cache::preloadScript):
(Cache::preloadStyleSheet):
Empty functions for these, called in KHTMLPart but no implementation needed.
* kwq/qt/qtimer.h:
* kwq/KWQTimer.mm:
(QTimer::isActive):
(QTimer::start):
(QTimer::stop):
More timer functions.
* kwq/qt/qscrollview.h: Add one more function.
* kwq/kdecore/kinstance.h: Simplify.
* kwq/kdeui/kaction.h: Simplify.
* kwq/khtml/khtml_factory.h: Simplify.
* kwq/kparts/browserextension.h: Simplify.
* kwq/kparts/part.h: Simplify.
* kwq/qt/qdatetime.h: Simplify.
* kwq/kdecore/klibloader.h: Added.
* kwq/khtml/khtml_ext.h: Added.
* kwq/kparts/partmanager.h: Added.
Nearly-empty files with just simple placeholders so we can compile more.
* kwq/dcop/kdatastream.h: Added.
* kwq/kdecore/kmultipledrag.h: Added.
* kwq/kdecore/ktempfile.h: Added.
* kwq/kdecore/kurldrag.h: Added.
* kwq/kdeui/kstdaction.h: Added.
* kwq/kdeui/kxmlguifactory.h: Added.
* kwq/khtml/khtml_find.h: Added.
* kwq/khtml/khtml_iface.h: Added.
* kwq/khtml/khtml_pagecache.h: Added.
* kwq/khtml/khtml_run.h: Added.
* kwq/kio/kssl/ksslcertchain.h: Added.
* kwq/kio/kssl/ksslinfodlg.h: Added.
* kwq/kio/ktrader.h: Added.
* kwq/qt/private/qucomextra_p.h: Added.
* kwq/qt/qclipboard.h: Added.
* kwq/qt/qmetaobject.h: Added.
Empty files just so includes of these names will compile.
* libwebcoretests.exp: Remove one export that's no longer needed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index ed8c893..0591a62 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,104 @@
+2002-05-20 Darin Adler <darin at apple.com>
+
+ Use more of the original khtml_part.cpp; a step in the direction of factoring
+ our code out so more of it can go in WebKit and we don't need external.h.
+
+ * khtml/Makefile.am:
+ * khtml/khtml_part.cpp:
+ * khtml/khtml_part.h:
+ * khtml/khtmlpart_p.h:
+ Start compiling khtml_part.cpp and using khtmlpart_p.h again.
+
+ * kwq/KWQKHTMLPart.mm:
+ Remove code that was identical to khtml_part.cpp. We aren't going to use the
+ "copy and hack our copy" approach on this class for the long termk, and this
+ is the first step in cleaning things up.
+
+ * khtml/khtml_ext.h: Removed.
+ * khtml/khtml_factory.h: Removed.
+
+ * khtml/misc/loader.h:
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::recalcStyleSelector):
+ Remove some APPLE_CHANGES ifdefs we don't need any more.
+
+ * kwq/KWQDateTime.mm:
+ Simplify things like copy constructors.
+
+ * kwq/kdeui/kcursor.h:
+ * kwq/KWQKCursor.mm:
+ Add handCursor.
+
+ * kwq/KWQKHTMLFactory.mm:
+ Put in real implementations, not just placeholders.
+
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ * kwq/KWQKInstance.mm:
+ * kwq/KWQPart.mm:
+ * kwq/KWQbrowserextension.mm:
+ Empty these files out, nothing in them is needed any more.
+
+ * kwq/khtml/khtml_settings.h:
+ * kwq/KWQKHTMLSettings.mm:
+ (KHTMLSettings::isJavaEnabled):
+ (KHTMLSettings::autoLoadImages):
+ (KHTMLSettings::isPluginsEnabled):
+ (KHTMLSettings::isJavaScriptEnabled):
+ (KHTMLSettings::isJavaScriptDebugEnabled):
+ Moved settings here from KWQKHTMLPart.mm
+
+ * kwq/kdecore/kurl.h:
+ * kwq/KWQKURL.mm:
+ (KURL::encodedHtmlRef):
+ (KURL::htmlRef):
+ Placeholders for these two, called in KHTMLPart, but maybe not really needed.
+
+ * kwq/KWQKloader.mm:
+ (Cache::preloadScript):
+ (Cache::preloadStyleSheet):
+ Empty functions for these, called in KHTMLPart but no implementation needed.
+
+ * kwq/qt/qtimer.h:
+ * kwq/KWQTimer.mm:
+ (QTimer::isActive):
+ (QTimer::start):
+ (QTimer::stop):
+ More timer functions.
+
+ * kwq/qt/qscrollview.h: Add one more function.
+
+ * kwq/kdecore/kinstance.h: Simplify.
+ * kwq/kdeui/kaction.h: Simplify.
+ * kwq/khtml/khtml_factory.h: Simplify.
+ * kwq/kparts/browserextension.h: Simplify.
+ * kwq/kparts/part.h: Simplify.
+ * kwq/qt/qdatetime.h: Simplify.
+
+ * kwq/kdecore/klibloader.h: Added.
+ * kwq/khtml/khtml_ext.h: Added.
+ * kwq/kparts/partmanager.h: Added.
+ Nearly-empty files with just simple placeholders so we can compile more.
+
+ * kwq/dcop/kdatastream.h: Added.
+ * kwq/kdecore/kmultipledrag.h: Added.
+ * kwq/kdecore/ktempfile.h: Added.
+ * kwq/kdecore/kurldrag.h: Added.
+ * kwq/kdeui/kstdaction.h: Added.
+ * kwq/kdeui/kxmlguifactory.h: Added.
+ * kwq/khtml/khtml_find.h: Added.
+ * kwq/khtml/khtml_iface.h: Added.
+ * kwq/khtml/khtml_pagecache.h: Added.
+ * kwq/khtml/khtml_run.h: Added.
+ * kwq/kio/kssl/ksslcertchain.h: Added.
+ * kwq/kio/kssl/ksslinfodlg.h: Added.
+ * kwq/kio/ktrader.h: Added.
+ * kwq/qt/private/qucomextra_p.h: Added.
+ * kwq/qt/qclipboard.h: Added.
+ * kwq/qt/qmetaobject.h: Added.
+ Empty files just so includes of these names will compile.
+
+ * libwebcoretests.exp: Remove one export that's no longer needed.
+
2002-05-20 Richard J. Williamson <rjw at apple.com>
* khtml/ecma/kjs_events.cpp:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ed8c893..0591a62 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,104 @@
+2002-05-20 Darin Adler <darin at apple.com>
+
+ Use more of the original khtml_part.cpp; a step in the direction of factoring
+ our code out so more of it can go in WebKit and we don't need external.h.
+
+ * khtml/Makefile.am:
+ * khtml/khtml_part.cpp:
+ * khtml/khtml_part.h:
+ * khtml/khtmlpart_p.h:
+ Start compiling khtml_part.cpp and using khtmlpart_p.h again.
+
+ * kwq/KWQKHTMLPart.mm:
+ Remove code that was identical to khtml_part.cpp. We aren't going to use the
+ "copy and hack our copy" approach on this class for the long termk, and this
+ is the first step in cleaning things up.
+
+ * khtml/khtml_ext.h: Removed.
+ * khtml/khtml_factory.h: Removed.
+
+ * khtml/misc/loader.h:
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::recalcStyleSelector):
+ Remove some APPLE_CHANGES ifdefs we don't need any more.
+
+ * kwq/KWQDateTime.mm:
+ Simplify things like copy constructors.
+
+ * kwq/kdeui/kcursor.h:
+ * kwq/KWQKCursor.mm:
+ Add handCursor.
+
+ * kwq/KWQKHTMLFactory.mm:
+ Put in real implementations, not just placeholders.
+
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ * kwq/KWQKInstance.mm:
+ * kwq/KWQPart.mm:
+ * kwq/KWQbrowserextension.mm:
+ Empty these files out, nothing in them is needed any more.
+
+ * kwq/khtml/khtml_settings.h:
+ * kwq/KWQKHTMLSettings.mm:
+ (KHTMLSettings::isJavaEnabled):
+ (KHTMLSettings::autoLoadImages):
+ (KHTMLSettings::isPluginsEnabled):
+ (KHTMLSettings::isJavaScriptEnabled):
+ (KHTMLSettings::isJavaScriptDebugEnabled):
+ Moved settings here from KWQKHTMLPart.mm
+
+ * kwq/kdecore/kurl.h:
+ * kwq/KWQKURL.mm:
+ (KURL::encodedHtmlRef):
+ (KURL::htmlRef):
+ Placeholders for these two, called in KHTMLPart, but maybe not really needed.
+
+ * kwq/KWQKloader.mm:
+ (Cache::preloadScript):
+ (Cache::preloadStyleSheet):
+ Empty functions for these, called in KHTMLPart but no implementation needed.
+
+ * kwq/qt/qtimer.h:
+ * kwq/KWQTimer.mm:
+ (QTimer::isActive):
+ (QTimer::start):
+ (QTimer::stop):
+ More timer functions.
+
+ * kwq/qt/qscrollview.h: Add one more function.
+
+ * kwq/kdecore/kinstance.h: Simplify.
+ * kwq/kdeui/kaction.h: Simplify.
+ * kwq/khtml/khtml_factory.h: Simplify.
+ * kwq/kparts/browserextension.h: Simplify.
+ * kwq/kparts/part.h: Simplify.
+ * kwq/qt/qdatetime.h: Simplify.
+
+ * kwq/kdecore/klibloader.h: Added.
+ * kwq/khtml/khtml_ext.h: Added.
+ * kwq/kparts/partmanager.h: Added.
+ Nearly-empty files with just simple placeholders so we can compile more.
+
+ * kwq/dcop/kdatastream.h: Added.
+ * kwq/kdecore/kmultipledrag.h: Added.
+ * kwq/kdecore/ktempfile.h: Added.
+ * kwq/kdecore/kurldrag.h: Added.
+ * kwq/kdeui/kstdaction.h: Added.
+ * kwq/kdeui/kxmlguifactory.h: Added.
+ * kwq/khtml/khtml_find.h: Added.
+ * kwq/khtml/khtml_iface.h: Added.
+ * kwq/khtml/khtml_pagecache.h: Added.
+ * kwq/khtml/khtml_run.h: Added.
+ * kwq/kio/kssl/ksslcertchain.h: Added.
+ * kwq/kio/kssl/ksslinfodlg.h: Added.
+ * kwq/kio/ktrader.h: Added.
+ * kwq/qt/private/qucomextra_p.h: Added.
+ * kwq/qt/qclipboard.h: Added.
+ * kwq/qt/qmetaobject.h: Added.
+ Empty files just so includes of these names will compile.
+
+ * libwebcoretests.exp: Remove one export that's no longer needed.
+
2002-05-20 Richard J. Williamson <rjw at apple.com>
* khtml/ecma/kjs_events.cpp:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ed8c893..0591a62 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,104 @@
+2002-05-20 Darin Adler <darin at apple.com>
+
+ Use more of the original khtml_part.cpp; a step in the direction of factoring
+ our code out so more of it can go in WebKit and we don't need external.h.
+
+ * khtml/Makefile.am:
+ * khtml/khtml_part.cpp:
+ * khtml/khtml_part.h:
+ * khtml/khtmlpart_p.h:
+ Start compiling khtml_part.cpp and using khtmlpart_p.h again.
+
+ * kwq/KWQKHTMLPart.mm:
+ Remove code that was identical to khtml_part.cpp. We aren't going to use the
+ "copy and hack our copy" approach on this class for the long termk, and this
+ is the first step in cleaning things up.
+
+ * khtml/khtml_ext.h: Removed.
+ * khtml/khtml_factory.h: Removed.
+
+ * khtml/misc/loader.h:
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::recalcStyleSelector):
+ Remove some APPLE_CHANGES ifdefs we don't need any more.
+
+ * kwq/KWQDateTime.mm:
+ Simplify things like copy constructors.
+
+ * kwq/kdeui/kcursor.h:
+ * kwq/KWQKCursor.mm:
+ Add handCursor.
+
+ * kwq/KWQKHTMLFactory.mm:
+ Put in real implementations, not just placeholders.
+
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ * kwq/KWQKInstance.mm:
+ * kwq/KWQPart.mm:
+ * kwq/KWQbrowserextension.mm:
+ Empty these files out, nothing in them is needed any more.
+
+ * kwq/khtml/khtml_settings.h:
+ * kwq/KWQKHTMLSettings.mm:
+ (KHTMLSettings::isJavaEnabled):
+ (KHTMLSettings::autoLoadImages):
+ (KHTMLSettings::isPluginsEnabled):
+ (KHTMLSettings::isJavaScriptEnabled):
+ (KHTMLSettings::isJavaScriptDebugEnabled):
+ Moved settings here from KWQKHTMLPart.mm
+
+ * kwq/kdecore/kurl.h:
+ * kwq/KWQKURL.mm:
+ (KURL::encodedHtmlRef):
+ (KURL::htmlRef):
+ Placeholders for these two, called in KHTMLPart, but maybe not really needed.
+
+ * kwq/KWQKloader.mm:
+ (Cache::preloadScript):
+ (Cache::preloadStyleSheet):
+ Empty functions for these, called in KHTMLPart but no implementation needed.
+
+ * kwq/qt/qtimer.h:
+ * kwq/KWQTimer.mm:
+ (QTimer::isActive):
+ (QTimer::start):
+ (QTimer::stop):
+ More timer functions.
+
+ * kwq/qt/qscrollview.h: Add one more function.
+
+ * kwq/kdecore/kinstance.h: Simplify.
+ * kwq/kdeui/kaction.h: Simplify.
+ * kwq/khtml/khtml_factory.h: Simplify.
+ * kwq/kparts/browserextension.h: Simplify.
+ * kwq/kparts/part.h: Simplify.
+ * kwq/qt/qdatetime.h: Simplify.
+
+ * kwq/kdecore/klibloader.h: Added.
+ * kwq/khtml/khtml_ext.h: Added.
+ * kwq/kparts/partmanager.h: Added.
+ Nearly-empty files with just simple placeholders so we can compile more.
+
+ * kwq/dcop/kdatastream.h: Added.
+ * kwq/kdecore/kmultipledrag.h: Added.
+ * kwq/kdecore/ktempfile.h: Added.
+ * kwq/kdecore/kurldrag.h: Added.
+ * kwq/kdeui/kstdaction.h: Added.
+ * kwq/kdeui/kxmlguifactory.h: Added.
+ * kwq/khtml/khtml_find.h: Added.
+ * kwq/khtml/khtml_iface.h: Added.
+ * kwq/khtml/khtml_pagecache.h: Added.
+ * kwq/khtml/khtml_run.h: Added.
+ * kwq/kio/kssl/ksslcertchain.h: Added.
+ * kwq/kio/kssl/ksslinfodlg.h: Added.
+ * kwq/kio/ktrader.h: Added.
+ * kwq/qt/private/qucomextra_p.h: Added.
+ * kwq/qt/qclipboard.h: Added.
+ * kwq/qt/qmetaobject.h: Added.
+ Empty files just so includes of these names will compile.
+
+ * libwebcoretests.exp: Remove one export that's no longer needed.
+
2002-05-20 Richard J. Williamson <rjw at apple.com>
* khtml/ecma/kjs_events.cpp:
diff --git a/WebCore/khtml/Makefile.am b/WebCore/khtml/Makefile.am
index 0fca5d9..5deee42 100644
--- a/WebCore/khtml/Makefile.am
+++ b/WebCore/khtml/Makefile.am
@@ -17,6 +17,7 @@ libkhtml_o_AR = $(OBJCXXLD) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS) $(AM_LDFLAGS) $(LDF
libkhtml_o_SOURCES = \
khtml_events.cpp \
+ khtml_part.cpp \
khtmlview.cpp \
$(NULL)
diff --git a/WebCore/khtml/khtml_ext.h b/WebCore/khtml/khtml_ext.h
deleted file mode 100644
index 7851eb0..0000000
--- a/WebCore/khtml/khtml_ext.h
+++ /dev/null
@@ -1,125 +0,0 @@
-#ifndef __khtml_ext_h__
-#define __khtml_ext_h__
-
-#include "khtml_part.h"
-
-#include <qguardedptr.h>
-
-#include <kaction.h>
-#include <kio/global.h>
-
-/**
- * This is the BrowserExtension for a @ref KHTMLPart document. Please see the KParts documentation for
- * more information about the BrowserExtension.
- */
-class KHTMLPartBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class KHTMLPart;
- friend class KHTMLView;
-public:
- KHTMLPartBrowserExtension( KHTMLPart *parent, const char *name = 0L );
-
- virtual int xOffset();
- virtual int yOffset();
-
- virtual void saveState( QDataStream &stream );
- virtual void restoreState( QDataStream &stream );
-
- // internal
- void editableWidgetFocused( QWidget *widget );
- void editableWidgetBlurred( QWidget *widget );
-
- void setExtensionProxy( KParts::BrowserExtension *proxyExtension );
-
-public slots:
- void cut();
- void copy();
- void paste();
- void reparseConfiguration();
- void print();
-
- // internal . updates the state of the cut/copt/paste action based
- // on whether data is available in the clipboard
- void updateEditActions();
-
-private slots:
- // connected to a frame's browserextensions enableAction signal
- void extensionProxyActionEnabled( const char *action, bool enable );
-
-private:
- void callExtensionProxyMethod( const char *method );
-
- KHTMLPart *m_part;
- QGuardedPtr<QWidget> m_editableFormWidget;
- QGuardedPtr<KParts::BrowserExtension> m_extensionProxy;
- bool m_connectedToClipboard;
-};
-
-class KHTMLPartBrowserHostExtension : public KParts::BrowserHostExtension
-{
-public:
- KHTMLPartBrowserHostExtension( KHTMLPart *part );
- virtual ~KHTMLPartBrowserHostExtension();
-
- virtual QStringList frameNames() const;
-
- virtual const QPtrList<KParts::ReadOnlyPart> frames() const;
-
- virtual bool openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs );
-private:
- KHTMLPart *m_part;
-};
-
-/**
- * @internal
- * INTERNAL class. *NOT* part of the public API.
- */
-class KHTMLPopupGUIClient : public QObject, public KXMLGUIClient
-{
- Q_OBJECT
-public:
- KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc, const KURL &url );
- virtual ~KHTMLPopupGUIClient();
-
- static void saveURL( QWidget *parent, const QString &caption, const KURL &url,
- const QMap<QString, QString> &metaData = KIO::MetaData(),
- const QString &filter = QString::null, long cacheId = 0,
- const QString &suggestedFilename = QString::null );
-
- static void saveURL( const KURL &url, const KURL &destination,
- const QMap<QString, QString> &metaData = KIO::MetaData(),
- long cacheId = 0 );
-private slots:
- void slotSaveLinkAs();
- void slotSaveImageAs();
- void slotCopyLinkLocation();
- void slotStopAnimations();
- void slotCopyImageLocation();
- void slotViewImage();
- void slotReloadFrame();
-private:
- class KHTMLPopupGUIClientPrivate;
- KHTMLPopupGUIClientPrivate *d;
-};
-
-class KHTMLZoomFactorAction : public KAction
-{
- Q_OBJECT
-public:
- KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const QString &text, const QString &icon, const QObject *receiver, const char *slot, QObject *parent, const char *name );
- virtual ~KHTMLZoomFactorAction();
-
- virtual int plug( QWidget *w, int index );
-
-private slots:
- void slotActivated( int );
-protected slots:
- void slotActivated() { KAction::slotActivated(); }
-private:
- QPopupMenu *m_popup;
- bool m_direction;
- KHTMLPart *m_part;
-};
-
-#endif
diff --git a/WebCore/khtml/khtml_factory.h b/WebCore/khtml/khtml_factory.h
deleted file mode 100644
index 02f58b1..0000000
--- a/WebCore/khtml/khtml_factory.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __khtml_factory_h__
-#define __khtml_factory_h__
-
-#include <kparts/factory.h>
-#include <kparts/historyprovider.h>
-#include <qptrlist.h>
-#include <kurl.h>
-
-class KInstance;
-class KAboutData;
-class HistoryProvider;
-class KHTMLSettings;
-class KHTMLPart;
-
-class KHTMLFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- KHTMLFactory( bool clone = false );
- virtual ~KHTMLFactory();
-
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &args );
-
- static void registerPart( KHTMLPart *part );
- static void deregisterPart( KHTMLPart *part );
-
- static QPtrList<KHTMLPart> *partList() { return s_parts; }
-
- static KInstance *instance();
-
- static KHTMLSettings *defaultHTMLSettings();
-
- // list of visited URLs
- static KParts::HistoryProvider *vLinks() {
- return KParts::HistoryProvider::self();
- }
-
-protected:
- static void ref();
- static void deref();
-private:
- static unsigned long s_refcnt;
- static KHTMLFactory *s_self;
- static KInstance *s_instance;
- static KAboutData *s_about;
- static KHTMLSettings *s_settings;
- static QPtrList<KHTMLPart> *s_parts;
-};
-
-#endif
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 056e85e..a57f081 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -27,6 +27,12 @@
#define SPEED_DEBUG
#include "khtml_part.h"
+#ifdef APPLE_CHANGES
+#define DIRECT_LINKAGE_TO_ECMA
+#define QT_NO_CLIPBOARD
+#define QT_NO_DRAGANDDROP
+#endif
+
#include "khtml_pagecache.h"
#include "dom/dom_string.h"
@@ -85,6 +91,8 @@ using namespace DOM;
#include "khtmlpart_p.h"
+#ifndef APPLE_CHANGES
+
namespace khtml {
class PartStyleSheetLoader : public CachedObjectClient
{
@@ -145,6 +153,8 @@ KHTMLPart::KHTMLPart( KHTMLView *view, QObject *parent, const char *name, GUIPro
init( view, prof );
}
+#endif
+
void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
{
if ( prof == DefaultGUI )
@@ -164,6 +174,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
d->m_bSecurityInQuestion = false;
d->m_paLoadImages = 0;
d->m_bMousePressed = false;
+#ifndef APPLE_CHANGES
d->m_paViewDocument = new KAction( i18n( "View Document Source" ), 0, this, SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" );
d->m_paViewFrame = new KAction( i18n( "View Frame Source" ), 0, this, SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" );
d->m_paSaveBackground = new KAction( i18n( "Save &Background Image As..." ), 0, this, SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" );
@@ -199,6 +210,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
d->m_paSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ), actionCollection(), "selectAll" );
if ( parentPart() )
d->m_paSelectAll->setShortcut( KShortcut() ); // avoid clashes
+#endif
// set the default java(script) flags according to the current host.
d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled();
@@ -206,6 +218,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled();
d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled();
+#ifndef APPLE_CHANGES
connect( this, SIGNAL( completed() ),
this, SLOT( updateActions() ) );
connect( this, SIGNAL( completed( bool ) ),
@@ -214,6 +227,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
this, SLOT( updateActions() ) );
d->m_popupMenuXML = KXMLGUIFactory::readConfigFile( locate( "data", "khtml/khtml_popupmenu.rc", KHTMLFactory::instance() ) );
+#endif
connect( khtml::Cache::loader(), SIGNAL( requestStarted( khtml::DocLoader*, khtml::CachedObject* ) ),
this, SLOT( slotLoaderRequestStarted( khtml::DocLoader*, khtml::CachedObject* ) ) );
@@ -222,17 +236,23 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
connect( khtml::Cache::loader(), SIGNAL( requestFailed( khtml::DocLoader*, khtml::CachedObject *) ),
this, SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
+#ifndef APPLE_CHANGES
findTextBegin(); //reset find variables
connect( &d->m_redirectionTimer, SIGNAL( timeout() ),
this, SLOT( slotRedirect() ) );
d->m_dcopobject = new KHTMLPartIface(this);
+#endif
}
KHTMLPart::~KHTMLPart()
{
//kdDebug(6050) << "KHTMLPart::~KHTMLPart " << this << endl;
+#ifdef APPLE_CHANGES
+ killTimers();
+#endif
+#ifndef APPLE_CHANGES
if ( d->m_findDialog )
disconnect( d->m_findDialog, SIGNAL( destroyed() ),
this, SLOT( slotFindDialogDestroyed() ) );
@@ -244,9 +264,12 @@ KHTMLPart::~KHTMLPart()
// No need to, I would say. We specify "this" as parent qobject
// in ::partManager() (Simon)
}
+#endif
stopAutoScroll();
+#ifndef APPLE_CHANGES
d->m_redirectionTimer.stop();
+#endif
if ( d->m_job )
d->m_job->kill();
@@ -278,7 +301,9 @@ bool KHTMLPart::restoreURL( const KURL &url )
{
kdDebug( 6050 ) << "KHTMLPart::restoreURL " << url.url() << endl;
+#ifndef APPLE_CHANGES
d->m_redirectionTimer.stop();
+#endif
/*
* That's not a good idea as it will call closeURL() on all
@@ -304,14 +329,18 @@ bool KHTMLPart::restoreURL( const KURL &url )
m_url = url;
+#ifndef APPLE_CHANGES
KHTMLPageCache::self()->fetchData( d->m_cacheId, this, SLOT(slotRestoreData(const QByteArray &)));
emit started( 0L );
+#endif
return true;
}
+#ifndef APPLE_CHANGES
+
bool KHTMLPart::openURL( const KURL &url )
{
kdDebug( 6050 ) << "KHTMLPart(" << this << ")::openURL " << url.url() << endl;
@@ -444,11 +473,15 @@ bool KHTMLPart::openURL( const KURL &url )
return true;
}
+#endif
+
bool KHTMLPart::closeURL()
{
if ( d->m_job )
{
+#ifndef APPLE_CHANGES
KHTMLPageCache::self()->cancelEntry(d->m_cacheId);
+#endif
d->m_job->kill();
d->m_job = 0;
}
@@ -468,11 +501,15 @@ bool KHTMLPart::closeURL()
d->m_bLoadEventEmitted = true; // don't want that one either
d->m_bReloading = false;
+#ifndef APPLE_CHANGES
KHTMLPageCache::self()->cancelFetch(this);
+#endif
if ( d->m_doc && d->m_doc->parsing() )
{
kdDebug( 6050 ) << " was still parsing... calling end " << endl;
+#ifndef APPLE_CHANGES
slotFinishedParsing();
+#endif
d->m_doc->setParsing(false);
}
@@ -485,6 +522,7 @@ bool KHTMLPart::closeURL()
d->m_workingURL = KURL();
+#ifndef APPLE_CHANGES
if ( d->m_doc && d->m_doc->docLoader() )
khtml::Cache::loader()->cancelRequests( d->m_doc->docLoader() );
@@ -494,12 +532,15 @@ bool KHTMLPart::closeURL()
for (; it != end; ++it )
if ( !( *it ).m_part.isNull() )
( *it ).m_part->closeURL();
+#endif
d->m_bPendingChildRedirection = false;
+#ifndef APPLE_CHANGES
// Stop any started redirections as well!! (DA)
if ( d && d->m_redirectionTimer.isActive() )
d->m_redirectionTimer.stop();
+#endif
// null node activated.
emit nodeActivated(Node());
@@ -742,6 +783,7 @@ void KHTMLPart::slotShowDocument( const QString &url, const QString &target )
}
else if ( frameName != QString::fromLatin1( "_self" ) )
{
+#ifndef APPLE_CHANGES
khtml::ChildFrame *_frame = recursiveFrameRequest( url, args );
if ( !_frame )
@@ -751,6 +793,7 @@ void KHTMLPart::slotShowDocument( const QString &url, const QString &target )
}
child = _frame;
+#endif
}
}
@@ -792,6 +835,7 @@ void KHTMLPart::setAutoloadImages( bool enable )
if ( d->m_doc )
d->m_doc->docLoader()->setAutoloadImages( enable );
+#ifndef APPLE_CHANGES
unplugActionList( "loadImages" );
if ( enable ) {
@@ -806,6 +850,7 @@ void KHTMLPart::setAutoloadImages( bool enable )
lst.append( d->m_paLoadImages );
plugActionList( "loadImages", lst );
}
+#endif
}
bool KHTMLPart::autoloadImages() const
@@ -825,6 +870,7 @@ void KHTMLPart::clear()
d->m_bClearing = true;
+#ifndef APPLE_CHANGES
{
ConstFrameIt it = d->m_frames.begin();
ConstFrameIt end = d->m_frames.end();
@@ -849,6 +895,7 @@ void KHTMLPart::clear()
findTextBegin(); // resets d->m_findNode and d->m_findPos
+#endif
d->m_mousePressNode = DOM::Node();
@@ -879,6 +926,7 @@ void KHTMLPart::clear()
d->m_decoder = 0;
+#ifndef APPLE_CHANGES
{
ConstFrameIt it = d->m_frames.begin();
ConstFrameIt end = d->m_frames.end();
@@ -894,6 +942,7 @@ void KHTMLPart::clear()
d->m_frames.clear();
d->m_objects.clear();
+#endif
#ifndef Q_WS_QWS
delete d->m_javaContext;
@@ -967,7 +1016,9 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
d->m_doc->docLoader()->setReloading(d->m_bReloading);
d->m_workingURL = KURL();
+#ifndef APPLE_CHANGES
d->m_cacheId = KHTMLPageCache::self()->createCacheEntry();
+#endif
// When the first data arrives, the metadata has just been made available
d->m_bSecurityInQuestion = false;
@@ -979,14 +1030,18 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
if (p && p->d->m_ssl_in_use != d->m_ssl_in_use) {
while (p->parentPart()) p = p->parentPart();
+#ifndef APPLE_CHANGES
p->d->m_paSecurity->setIcon( "halfencrypted" );
+#endif
p->d->m_bSecurityInQuestion = true;
kdDebug(6050) << "parent setIcon half done." << endl;
}
}
+#ifndef APPLE_CHANGES
d->m_paSecurity->setIcon( d->m_ssl_in_use ? "encrypted" : "decrypted" );
kdDebug(6050) << "setIcon " << ( d->m_ssl_in_use ? "encrypted" : "decrypted" ) << " done." << endl;
+#endif
// Shouldn't all of this be done only if ssl_in_use == true ? (DF)
@@ -1054,7 +1109,9 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
//kdDebug() << "KHTMLPart::slotData metadata modified: " << d->m_lastModified << endl;
}
+#ifndef APPLE_CHANGES
KHTMLPageCache::self()->addData(d->m_cacheId, data);
+#endif
write( data.data(), data.size() );
}
@@ -1081,6 +1138,8 @@ void KHTMLPart::slotRestoreData(const QByteArray &data )
}
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::showError( KIO::Job* job )
{
kdDebug() << "KHTMLPart::showError d->m_bParsing=" << (d->m_doc && d->m_doc->parsing()) << " d->m_bComplete=" << d->m_bComplete
@@ -1199,21 +1258,31 @@ void KHTMLPart::htmlError( int errorCode, const QString& text, const KURL& reqUr
end();
}
+#endif
+
void KHTMLPart::slotFinished( KIO::Job * job )
{
if (job->error())
{
+#ifndef APPLE_CHANGES
KHTMLPageCache::self()->cancelEntry(d->m_cacheId);
+#endif
d->m_job = 0L;
+#ifndef APPLE_CHANGES
emit canceled( job->errorString() );
+#endif
// TODO: what else ?
checkCompleted();
+#ifndef APPLE_CHANGES
showError( job );
+#endif
return;
}
//kdDebug( 6050 ) << "slotFinished" << endl;
+#ifndef APPLE_CHANGES
KHTMLPageCache::self()->endData(d->m_cacheId);
+#endif
if ( d->m_doc && d->m_doc->docLoader()->expireDate() && m_url.protocol().lower().startsWith("http"))
KIO::http_update_cache(m_url, false, d->m_doc->docLoader()->expireDate());
@@ -1225,6 +1294,8 @@ void KHTMLPart::slotFinished( KIO::Job * job )
end(); //will emit completed()
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
{
clear();
@@ -1233,6 +1304,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
d->m_bComplete = false;
d->m_bLoadEventEmitted = false;
+#ifndef APPLE_CHANGES
if(url.isValid()) {
QString urlString = url.url();
KHTMLFactory::vLinks()->insert( urlString );
@@ -1241,6 +1313,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
KHTMLFactory::vLinks()->insert( urlString2 );
}
}
+#endif
// ###
//stopParser();
@@ -1254,6 +1327,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
m_url = url;
KURL baseurl;
+#ifndef APPLE_CHANGES
if ( !m_url.isEmpty() )
{
KURL::List lst = KURL::split( m_url );
@@ -1267,6 +1341,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
}
else
emit setWindowCaption( i18n( "no title", "* Unknown *" ) );
+#endif
// ### not sure if XHTML documents served as text/xml should use DocumentImpl or HTMLDocumentImpl
if (args.serviceType == "text/xml")
@@ -1281,8 +1356,11 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
// We prefer m_baseURL over m_url because m_url changes when we are
// about to load a new page.
d->m_doc->setBaseURL( baseurl.url() );
+#ifndef APPLE_CHANGES
d->m_doc->docLoader()->setShowAnimations( KHTMLFactory::defaultHTMLSettings()->showAnimations() );
+#endif
+#ifndef APPLE_CHANGES
// Inherit domain from parent
KHTMLPart* parent = parentPart();
if (d->m_doc->isHTMLDocument() && parent && parent->d->m_doc && parent->d->m_doc->isHTMLDocument()) {
@@ -1293,19 +1371,24 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
d->m_paUseStylesheet->setItems(QStringList());
d->m_paUseStylesheet->setEnabled( false );
+#endif
setAutoloadImages( KHTMLFactory::defaultHTMLSettings()->autoLoadImages() );
QString userStyleSheet = KHTMLFactory::defaultHTMLSettings()->userStyleSheet();
if ( !userStyleSheet.isEmpty() )
setUserStyleSheet( KURL( userStyleSheet ) );
+#ifndef APPLE_CHANGES
d->m_doc->setRestoreState(args.docState);
+#endif
d->m_doc->open();
// clear widget
d->m_view->resizeContents( 0, 0 );
connect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
+#ifndef APPLE_CHANGES
emit d->m_extension->enableAction( "print", true );
+#endif
d->m_doc->setParsing(true);
}
@@ -1347,6 +1430,8 @@ void KHTMLPart::write( const char *str, int len )
t->write( decoded, true );
}
+#endif
+
void KHTMLPart::write( const QString &str )
{
if ( str.isNull() )
@@ -1364,6 +1449,8 @@ void KHTMLPart::write( const QString &str )
t->write( str, true );
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::end()
{
// make sure nothing's left in there...
@@ -1373,6 +1460,8 @@ void KHTMLPart::end()
d->m_doc->finishParsing();
}
+#endif
+
void KHTMLPart::paint(QPainter *p, const QRect &rc, int yOff, bool *more)
{
if (!d->m_view) return;
@@ -1381,6 +1470,7 @@ void KHTMLPart::paint(QPainter *p, const QRect &rc, int yOff, bool *more)
void KHTMLPart::stopAnimations()
{
+#ifndef APPLE_CHANGES
if ( d->m_doc )
d->m_doc->docLoader()->setShowAnimations( KHTMLSettings::KAnimationDisabled );
@@ -1391,6 +1481,7 @@ void KHTMLPart::stopAnimations()
KParts::ReadOnlyPart* p = ( *it ).m_part;
static_cast<KHTMLPart*>( p )->stopAnimations();
}
+#endif
}
void KHTMLPart::slotFinishedParsing()
@@ -1443,6 +1534,8 @@ void KHTMLPart::slotLoaderRequestDone( khtml::DocLoader* dl, khtml::CachedObject
checkCompleted();
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::slotProgressUpdate()
{
int percent;
@@ -1470,6 +1563,8 @@ void KHTMLPart::slotJobPercent( KIO::Job* /*job*/, unsigned long percent )
QTimer::singleShot( 0, this, SLOT( slotProgressUpdate() ) );
}
+#endif
+
void KHTMLPart::checkCompleted()
{
// kdDebug( 6050 ) << "KHTMLPart::checkCompleted() parsing: " << d->m_doc->parsing() << endl;
@@ -1485,12 +1580,14 @@ void KHTMLPart::checkCompleted()
d->m_focusNodeRestored = true;
}
+#ifndef APPLE_CHANGES
// Any frame that hasn't completed yet ?
ConstFrameIt it = d->m_frames.begin();
ConstFrameIt end = d->m_frames.end();
for (; it != end; ++it )
if ( !(*it).m_bCompleted )
return;
+#endif
// Are we still parsing - or have we done the completed stuff already ?
if ( d->m_bComplete || (d->m_doc && d->m_doc->parsing()) )
@@ -1517,6 +1614,7 @@ void KHTMLPart::checkCompleted()
d->m_view->complete();
+#ifndef APPLE_CHANGES
if ( !d->m_redirectURL.isEmpty() )
{
// Do not start redirection for frames here! That action is
@@ -1533,11 +1631,13 @@ void KHTMLPart::checkCompleted()
else
emit completed();
}
+#endif
// find the alternate stylesheets
QStringList sheets;
if (d->m_doc)
sheets = d->m_doc->availableStyleSheets();
+#ifndef APPLE_CHANGES
d->m_paUseStylesheet->setItems( sheets );
d->m_paUseStylesheet->setEnabled( !sheets.isEmpty() );
if (!sheets.isEmpty())
@@ -1545,6 +1645,7 @@ void KHTMLPart::checkCompleted()
if (!parentPart())
emit setStatusBarText(i18n("Done."));
+#endif
#ifdef SPEED_DEBUG
kdDebug(6050) << "DONE: " <<d->m_parsetime.elapsed() << endl;
@@ -1553,6 +1654,7 @@ void KHTMLPart::checkCompleted()
void KHTMLPart::checkEmitLoadEvent()
{
+#ifndef APPLE_CHANGES
if ( d->m_bLoadEventEmitted || !d->m_doc || d->m_doc->parsing() ) return;
ConstFrameIt it = d->m_frames.begin();
@@ -1564,6 +1666,7 @@ void KHTMLPart::checkEmitLoadEvent()
d->m_bLoadEventEmitted = true;
if (d->m_doc)
d->m_doc->close();
+#endif
}
const KHTMLSettings *KHTMLPart::settings() const
@@ -1597,6 +1700,8 @@ KURL KHTMLPart::completeURL( const QString &url )
return KURL( d->m_doc->completeURL( url ) );
}
+#ifndef APPLE_CHANGES
+
// ### implement lockhistory being optional (sometimes javascript wants
// to do redirection that end up in the history!)
void KHTMLPart::scheduleRedirection( int delay, const QString &url, bool /* doLockHistory*/ )
@@ -1613,6 +1718,8 @@ void KHTMLPart::scheduleRedirection( int delay, const QString &url, bool /* doLo
}
}
+#endif
+
void KHTMLPart::slotRedirect()
{
QString u = d->m_redirectURL;
@@ -1624,18 +1731,22 @@ void KHTMLPart::slotRedirect()
//kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl;
QVariant res = executeScript( script );
if ( res.type() == QVariant::String ) {
+#ifndef APPLE_CHANGES
begin( url() );
write( res.asString() );
end();
+#endif
}
return;
}
+#ifndef APPLE_CHANGES
KParts::URLArgs args;
if ( urlcmp( u, m_url.url(), true, true ) )
args.reload = true;
args.setLockHistory( true );
urlSelected( u, 0, 0, QString::null, args );
+#endif
}
void KHTMLPart::slotRedirection(KIO::Job*, const KURL& url)
@@ -1651,6 +1762,7 @@ bool KHTMLPart::setEncoding( const QString &name, bool override )
d->m_encoding = name;
d->m_haveEncoding = override;
+#ifndef APPLE_CHANGES
if( !m_url.isEmpty() ) {
// reload document
closeURL();
@@ -1658,6 +1770,7 @@ bool KHTMLPart::setEncoding( const QString &name, bool override )
m_url = 0;
openURL(url);
}
+#endif
return true;
}
@@ -1675,8 +1788,10 @@ QString KHTMLPart::encoding() const
void KHTMLPart::setUserStyleSheet(const KURL &url)
{
+#ifndef APPLE_CHANGES
if ( d->m_doc && d->m_doc->docLoader() )
(void) new khtml::PartStyleSheetLoader(this, url.url(), d->m_doc->docLoader());
+#endif
}
void KHTMLPart::setUserStyleSheet(const QString &styleSheet)
@@ -1739,6 +1854,8 @@ void KHTMLPart::setOnlyLocalReferences(bool enable)
d->m_onlyLocalReferences = enable;
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::findTextBegin()
{
d->m_findPos = -1;
@@ -1844,6 +1961,8 @@ bool KHTMLPart::findTextNext( const QString &str, bool forward, bool caseSensiti
}
}
+#endif
+
QString KHTMLPart::selectedText() const
{
QString text;
@@ -1938,6 +2057,8 @@ void KHTMLPart::slotClearSelection()
emitSelectionChanged();
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::overURL( const QString &url, const QString &target, bool shiftPressed )
{
if ( !d->m_kjsStatusBarText.isEmpty() && !shiftPressed ) {
@@ -2436,11 +2557,15 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
return requestObject( &(*it), completeURL( url ));
}
+#endif
+
QString KHTMLPart::requestFrameName()
{
return QString::fromLatin1("<!--frame %1-->").arg(d->m_frameNameId++);
}
+#ifndef APPLE_CHANGES
+
bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, const QString &serviceType,
const QStringList ¶ms )
{
@@ -2717,6 +2842,8 @@ KParts::PartManager *KHTMLPart::partManager()
return d->m_manager;
}
+#endif
+
void KHTMLPart::submitFormAgain()
{
if( d->m_doc && !d->m_doc->parsing() && d->m_submitForm)
@@ -2727,6 +2854,8 @@ void KHTMLPart::submitFormAgain()
disconnect(this, SIGNAL(completed()), this, SLOT(submitFormAgain()));
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::submitForm( const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary )
{
kdDebug(6000) << this << ": KHTMLPart::submitForm target=" << _target << " url=" << url << endl;
@@ -3050,6 +3179,8 @@ bool KHTMLPart::frameExists( const QString &frameName )
return (!(*it).m_frame.isNull());
}
+#endif
+
KHTMLPart *KHTMLPart::parentPart()
{
if ( !parent() || !parent()->inherits( "KHTMLPart" ) )
@@ -3058,6 +3189,8 @@ KHTMLPart *KHTMLPart::parentPart()
return (KHTMLPart *)parent();
}
+#ifndef APPLE_CHANGES
+
khtml::ChildFrame *KHTMLPart::recursiveFrameRequest( const KURL &url, const KParts::URLArgs &args,
bool callParent )
{
@@ -3212,7 +3345,9 @@ void KHTMLPart::restoreState( QDataStream &stream )
>> d->m_ssl_cipher_bits
>> d->m_ssl_cert_state;
+#ifndef APPLE_CHANGES
d->m_paSecurity->setIcon( d->m_ssl_in_use ? "encrypted" : "decrypted" );
+#endif
stream >> frameCount >> frameNames >> frameServiceTypes >> frameServiceNames
>> frameURLs >> frameStateBuffers;
@@ -3341,6 +3476,8 @@ void KHTMLPart::restoreState( QDataStream &stream )
}
+#endif
+
void KHTMLPart::show()
{
if ( d->m_view )
@@ -3360,9 +3497,11 @@ DOM::Node KHTMLPart::nodeUnderMouse() const
void KHTMLPart::emitSelectionChanged()
{
+#ifndef APPLE_CHANGES
emit d->m_extension->enableAction( "copy", hasSelection() );
emit d->m_extension->selectionInfo( selectedText() );
emit selectionChanged();
+#endif
}
int KHTMLPart::zoomFactor() const
@@ -3407,6 +3546,7 @@ void KHTMLPart::slotDecZoom()
void KHTMLPart::setZoomFactor (int percent)
{
+#ifndef APPLE_CHANGES
if (percent < minZoom) percent = minZoom;
if (percent > maxZoom) percent = maxZoom;
if (d->m_zoomFactor == percent) return;
@@ -3430,6 +3570,7 @@ void KHTMLPart::setZoomFactor (int percent)
d->m_paDecZoomFactor->setEnabled( d->m_zoomFactor > minZoom );
d->m_paIncZoomFactor->setEnabled( d->m_zoomFactor < maxZoom );
+#endif
}
void KHTMLPart::setJSStatusBarText( const QString &text )
@@ -3464,6 +3605,8 @@ QString KHTMLPart::lastModified() const
return d->m_lastModified;
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::slotLoadImages()
{
if (d->m_doc )
@@ -3478,14 +3621,18 @@ void KHTMLPart::slotLoadImages()
}
}
+#endif
+
void KHTMLPart::reparseConfiguration()
{
KHTMLSettings *settings = KHTMLFactory::defaultHTMLSettings();
settings->init();
setAutoloadImages( settings->autoLoadImages() );
+#ifndef APPLE_CHANGES
if (d->m_doc)
d->m_doc->docLoader()->setShowAnimations( settings->showAnimations() );
+#endif
d->m_bJScriptEnabled = settings->isJavaScriptEnabled(m_url.host());
d->m_bJScriptDebugEnabled = settings->isJavaScriptDebugEnabled();
@@ -3499,6 +3646,8 @@ void KHTMLPart::reparseConfiguration()
QApplication::restoreOverrideCursor();
}
+#ifndef APPLE_CHANGES
+
QStringList KHTMLPart::frameNames() const
{
QStringList res;
@@ -3539,6 +3688,8 @@ bool KHTMLPart::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs
return true;
}
+#endif
+
void KHTMLPart::setDNDEnabled( bool b )
{
d->m_bDnd = b;
@@ -3549,6 +3700,8 @@ bool KHTMLPart::dndEnabled() const
return d->m_bDnd;
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::customEvent( QCustomEvent *event )
{
if ( khtml::MousePressEvent::test( event ) )
@@ -4024,6 +4177,8 @@ void KHTMLPart::slotSelectAll()
static_cast<KHTMLPart *>(part)->selectAll();
}
+#endif
+
void KHTMLPart::startAutoScroll()
{
connect(&d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ));
@@ -4104,6 +4259,8 @@ void KHTMLPart::selectAll()
emitSelectionChanged();
}
+#ifndef APPLE_CHANGES
+
bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const QString &message, const QString &button)
{
// Security check on the link.
@@ -4141,6 +4298,8 @@ bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const QString &message, co
return true;
}
+#endif
+
QVariant KHTMLPart::executeScript(QString filename, int baseLine, const DOM::Node &n, const QString &script)
{
#ifdef KJS_VERBOSE
@@ -4162,6 +4321,8 @@ void KHTMLPart::slotPartRemoved( KParts::Part *part )
d->m_activeFrame = 0L;
}
+#ifndef APPLE_CHANGES
+
void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
{
// kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged part=" << part << endl;
@@ -4201,6 +4362,8 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
d->m_extension->setExtensionProxy( KParts::BrowserExtension::childObject( d->m_activeFrame ) );
}
+#endif
+
void KHTMLPart::setActiveNode(const DOM::Node &node)
{
if (!d->m_doc || !d->m_view)
@@ -4260,6 +4423,8 @@ void KHTMLPart::preloadScript(const QString &url, const QString &script)
khtml::Cache::preloadScript(url, script);
}
+#ifndef APPLE_CHANGES
+
QCString KHTMLPart::dcopObjectId() const
{
QCString id;
@@ -4267,6 +4432,8 @@ QCString KHTMLPart::dcopObjectId() const
return id;
}
+#endif
+
long KHTMLPart::cacheId() const
{
return d->m_cacheId;
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index b04e932..2485c9d 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -794,12 +794,12 @@ protected:
* Internal reimplementation of KParts::Part::guiActivateEvent .
*/
virtual void guiActivateEvent( KParts::GUIActivateEvent *event );
+#endif
/**
* Internal empty reimplementation of @ref KParts::ReadOnlyPart::openFile .
*/
virtual bool openFile();
-#endif
virtual void urlSelected( const QString &url, int button, int state,
const QString &_target, KParts::URLArgs args = KParts::URLArgs());
@@ -839,8 +839,6 @@ public slots:
QCString dcopObjectId() const;
-#ifndef APPLE_CHANGES
-
private slots:
/**
@@ -880,6 +878,7 @@ private slots:
* @internal
*/
void slotDebugRenderTree();
+#ifndef APPLE_CHANGES
/**
* @internal
*/
@@ -917,6 +916,7 @@ private slots:
virtual void slotFind();
virtual void slotFindDone();
virtual void slotFindDialogDestroyed();
+#endif
void slotIncZoom();
void slotDecZoom();
@@ -999,8 +999,6 @@ private slots:
*/
void slotClearSelection();
-#endif
-
private:
@@ -1119,9 +1117,6 @@ public:
QString documentSource() const;
- QString sheetUsed() const;
- void setSheetUsed(const QString &);
-
void setTitle(const DOM::DOMString &);
void setDataSource(IFWebDataSource *);
diff --git a/WebCore/khtml/khtmlpart_p.h b/WebCore/khtml/khtmlpart_p.h
index 8760b99..0b54b73 100644
--- a/WebCore/khtml/khtmlpart_p.h
+++ b/WebCore/khtml/khtmlpart_p.h
@@ -25,7 +25,6 @@
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
-#ifndef APPLE_CHANGES
#include <kcursor.h>
#include <klibloader.h>
#include <kxmlguifactory.h>
@@ -49,6 +48,8 @@ namespace KIO
class TransferJob;
};
+#ifndef APPLE_CHANGES
+
namespace khtml
{
struct ChildFrame
@@ -87,6 +88,8 @@ public:
typedef FrameList::ConstIterator ConstFrameIt;
typedef FrameList::Iterator FrameIt;
+#endif // APPLE_CHANGES
+
static int khtml_part_dcop_counter = 0;
class KHTMLPartPrivate
@@ -147,6 +150,7 @@ public:
m_bPendingChildRedirection = false;
+#ifndef APPLE_CHANGES
// inherit settings from parent
if(parent && parent->inherits("KHTMLPart"))
{
@@ -165,6 +169,7 @@ public:
m_zoomFactor = part->d->m_zoomFactor;
}
}
+#endif
m_focusNodeNumber = -1;
m_focusNodeRestored = false;
@@ -173,6 +178,11 @@ public:
m_newJSInterpreterExists = false;
m_dcopobject = 0;
m_dcop_counter = ++khtml_part_dcop_counter;
+
+#ifdef APPLE_CHANGES
+ m_decodingStarted = 0;
+ m_dataSource = 0;
+#endif
}
~KHTMLPartPrivate()
{
@@ -187,8 +197,10 @@ public:
#endif
}
+#ifndef APPLE_CHANGES
FrameList m_frames;
QValueList<khtml::ChildFrame> m_objects;
+#endif
QGuardedPtr<KHTMLView> m_view;
KHTMLPartBrowserExtension *m_extension;
@@ -254,7 +266,11 @@ public:
KURL m_workingURL;
+#ifdef APPLE_CHANGES
+ int m_redirectionTimer;
+#else
QTimer m_redirectionTimer;
+#endif
QTime m_parsetime;
int m_delayRedirect;
QString m_redirectURL;
@@ -354,7 +370,13 @@ public:
bool m_newJSInterpreterExists; // set to 1 by setOpenedByJS, for window.open
bool m_bPendingChildRedirection;
+
+#ifdef APPLE_CHANGES
+ KURL m_baseURL;
+ QString m_documentSource;
+ bool m_decodingStarted;
+ void *m_dataSource;
+#endif
};
#endif
-#endif /* APPLE_CHANGES not defined */
diff --git a/WebCore/khtml/misc/loader.h b/WebCore/khtml/misc/loader.h
index 8bb7139..23404bd 100644
--- a/WebCore/khtml/misc/loader.h
+++ b/WebCore/khtml/misc/loader.h
@@ -70,7 +70,7 @@ namespace khtml
class Request;
#ifdef APPLE_CHANGES
class LoaderPrivate;
-#endif /* APPLE_CHANGES */
+#endif
class DocLoader;
/**
@@ -102,13 +102,13 @@ namespace khtml
#ifdef APPLE_CHANGES
CachedObject(const DocLoader *loader, const DOM::DOMString &url, Type type, bool _reload, int _expireDate)
-#else /* APPLE_CHANGES not defined */
+#else
CachedObject(const DOM::DOMString &url, Type type, bool _reload, int _expireDate)
-#endif /* APPLE_CHANGES not defined */
+#endif
{
#ifdef APPLE_CHANGES
m_loader = loader;
-#endif /* APPLE_CHANGES */
+#endif
m_url = url;
m_type = type;
m_status = Pending;
@@ -172,12 +172,12 @@ namespace khtml
void setAccept(const QString &_accept) { m_accept = _accept; }
#ifdef APPLE_CHANGES
const DocLoader *loader() { return m_loader; }
-#endif /* APPLE_CHANGES */
+#endif
protected:
#ifdef APPLE_CHANGES
const DocLoader *m_loader;
-#endif /* APPLE_CHANGES */
+#endif
QPtrList<CachedObjectClient> m_clients;
DOM::DOMString m_url;
@@ -277,9 +277,7 @@ namespace khtml
bool isTransparent() const { return isFullyTransparent; }
bool isErrorImage() const { return errorOccured; }
-#ifndef APPLE_CHANGES
void setShowAnimations( KHTMLSettings::KAnimationAdvice );
-#endif /* APPLE_CHANGES */
virtual bool schedule() const { return true; }
@@ -315,9 +313,7 @@ namespace khtml
bool isFullyTransparent : 1;
bool errorOccured : 1;
bool monochrome : 1;
-#ifndef APPLE_CHANGES
KHTMLSettings::KAnimationAdvice m_showAnimations : 2;
-#endif /* not APPLE_CHANGES */
friend class Cache;
};
@@ -339,9 +335,7 @@ namespace khtml
bool autoloadImages() const { return m_bautoloadImages; }
bool reloading() const { return m_reloading; }
-#ifndef APPLE_CHANGES
KHTMLSettings::KAnimationAdvice showAnimations() const { return m_showAnimations; }
-#endif /* not APPLE_CHANGES */
int expireDate() const { return m_expireDate; }
KHTMLPart* part() const { return m_part; }
DOM::DocumentImpl* doc() const { return m_doc; }
@@ -349,9 +343,7 @@ namespace khtml
void setExpireDate( int );
void setAutoloadImages( bool );
void setReloading( bool );
-#ifndef APPLE_CHANGES
void setShowAnimations( KHTMLSettings::KAnimationAdvice );
-#endif /* not APPLE_CHANGES */
void removeCachedObject( CachedObject*) const;
private:
@@ -363,9 +355,7 @@ namespace khtml
int m_expireDate;
bool m_reloading : 1;
bool m_bautoloadImages : 1;
-#ifndef APPLE_CHANGES
KHTMLSettings::KAnimationAdvice m_showAnimations : 2;
-#endif /* not APPLE_CHANGES */
KHTMLPart* m_part;
DOM::DocumentImpl* m_doc;
};
@@ -384,7 +374,7 @@ namespace khtml
DocLoader* m_docLoader;
#ifdef APPLE_CHANGES
void *client;
-#endif /* APPLE_CHANGES */
+#endif
};
/**
@@ -415,11 +405,11 @@ namespace khtml
public:
void slotFinished( KIO::Job * );
void slotData( KIO::Job *, const char *data, int size );
-#else /* APPLE_CHANGES not defined */
+#else
protected slots:
void slotFinished( KIO::Job * );
void slotData( KIO::Job *, const QByteArray & );
-#endif /* APPLE_CHANGES not defined */
+#endif
private:
void servePendingRequests();
@@ -430,12 +420,8 @@ namespace khtml
KJPEGFormatType m_jpegloader;
#endif
#ifdef APPLE_CHANGES
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
- LoaderPrivate *d;
-#else /* __APPLE__, __OBJC__, __cplusplus not defined */
- void *d;
-#endif /* __APPLE__, __OBJC__, __cplusplus not defined */
-#endif /* APPLE_CHANGES */
+ LoaderPrivate *d;
+#endif
};
/**
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index e6221fb..03d276d 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -1731,19 +1731,10 @@ void DocumentImpl::recalcStyleSelector()
if (!l->sheet() || l->isLoading())
title = QString::null;
}
-#ifdef APPLE_CHANGES
- QString sheetUsed = view()->part()->sheetUsed();
-#else
QString sheetUsed = view()->part()->d->m_sheetUsed;
-#endif
if ( !title.isEmpty() ) {
if ( sheetUsed.isEmpty() )
-#ifdef APPLE_CHANGES
- sheetUsed = title;
- view()->part()->setSheetUsed(sheetUsed);
-#else
sheetUsed = view()->part()->d->m_sheetUsed = title;
-#endif
if ( !m_availableSheets.contains( title ) )
m_availableSheets.append( title );
}
diff --git a/WebCore/kwq/KWQDateTime.h b/WebCore/kwq/KWQDateTime.h
index e3917a7..1c352f2 100644
--- a/WebCore/kwq/KWQDateTime.h
+++ b/WebCore/kwq/KWQDateTime.h
@@ -26,39 +26,13 @@
#ifndef QDATETIME_H_
#define QDATETIME_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QDATETIME ====================================================
-
-#ifdef USING_BORROWED_QDATETIME
-#include <_qdatetime.h>
-#else
-
#include <iostream>
-// class QTime =================================================================
-
class QTime {
public:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QTime();
QTime(int, int);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QTime() {}
-#endif
-
- // member functions --------------------------------------------------------
-
bool isNull() const;
int hour() const;
int minute() const;
@@ -69,52 +43,22 @@ public:
int restart();
int secsTo( const QTime & ) const;
- // operators ---------------------------------------------------------------
-
- //QTime &operator=(const QTime &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
-
uint getCurrentTime();
void setCurrentTime();
+
uint timeMS; // time is stored in milliseconds
friend class QDateTime;
friend std::ostream &operator<<( std::ostream &, const QTime & );
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QTime(const QTime &);
-#endif
-
-}; // class QTime ==============================================================
-
-
-// class QDate =================================================================
+};
class QDate {
public:
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
QDate();
QDate(int, int, int);
-
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QDate() {}
-#endif
-
- // member functions --------------------------------------------------------
int year() const;
int month() const;
@@ -122,13 +66,6 @@ public:
int daysTo( const QDate & ) const;
- // operators ---------------------------------------------------------------
-
- //QDate &operator=(const QDate &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
protected:
uint greg2jul( int, int, int ) const;
void jul2greg( uint jd, int &y, int &m, int &d ) const;
@@ -141,62 +78,26 @@ private:
friend class QDateTime;
friend std::ostream &operator<<( std::ostream &, const QDate & );
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QDate(const QDate &);
-#endif
-
-}; // class QDate ==============================================================
-
-// class QDateTime =============================================================
+};
class QDateTime {
public:
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
static QDateTime currentDateTime();
- // constructors, copy constructors, and destructors ------------------------
-
QDateTime();
- QDateTime(const QDateTime &);
QDateTime(const QDate &, const QTime &);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QDateTime() {}
-#endif
-
- // member functions --------------------------------------------------------
-
int secsTo(const QDateTime &) const;
QTime time() const;
void setTime_t( uint );
- // operators ---------------------------------------------------------------
-
- // this is not declared in the code, although assignment of this type
- // is used in the code... i guess a pointer copy is what they want
- //
- //QDateTime &operator=(const QDateTime &);
- //
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
QTime timeDT;
QDate dateDT;
-
friend std::ostream &operator<<( std::ostream &, const QDateTime & );
-}; // class QDateTime ==========================================================
-
-#endif // USING_BORROWED_QDATETIME
+};
#endif
diff --git a/WebCore/kwq/KWQDateTime.mm b/WebCore/kwq/KWQDateTime.mm
index e624e9c..9220926 100644
--- a/WebCore/kwq/KWQDateTime.mm
+++ b/WebCore/kwq/KWQDateTime.mm
@@ -27,8 +27,6 @@
#include <qdatetime.h>
#include <time.h>
-#ifndef USING_BORROWED_QDATETIME
-
// QTime class ===============================================================
// constructors, copy constructors, and destructors ----------------------------
@@ -43,12 +41,6 @@ QTime::QTime(int hours, int minutes)
timeMS = (hours*3600 + minutes*60)*1000;
}
-QTime::QTime(const QTime &newTime)
-{
- timeMS = newTime.timeMS;
-}
-
-
// member functions --------------------------------------------------------
bool QTime::isNull() const
@@ -279,13 +271,6 @@ QDateTime::QDateTime(const QDate &newDate, const QTime &newTime)
timeDT = newTime;
}
-QDateTime::QDateTime(const QDateTime &newDateTime)
-{
- dateDT = newDateTime.dateDT;
- timeDT = newDateTime.timeDT;
-}
-
-
// member functions --------------------------------------------------------
int QDateTime::secsTo( const QDateTime &newerDateTime ) const
@@ -298,9 +283,9 @@ QTime QDateTime::time() const
return timeDT;
}
-//FIX ME: this looks too much like qt's setTime_t
+// FIXME: Use Apple stuff? This is too much like qt's setTime_t.
-void QDateTime::setTime_t( uint secsSince1Jan1970UTC )
+void QDateTime::setTime_t(uint secsSince1Jan1970UTC)
{
time_t myTime = (time_t) secsSince1Jan1970UTC;
tm *localTime;
@@ -364,5 +349,3 @@ std::ostream &operator<<(std::ostream &o, const QDateTime &dateTime)
dateTime.timeDT.msec() <<
']';
}
-
-#endif // USING_BORROWED_QDATETIME
diff --git a/WebCore/kwq/KWQKCursor.h b/WebCore/kwq/KWQKCursor.h
index b4d536b..f81abfd 100644
--- a/WebCore/kwq/KWQKCursor.h
+++ b/WebCore/kwq/KWQKCursor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,31 +26,16 @@
#ifndef KCURSOR_H_
#define KCURSOR_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qwidget.h>
-
-static const QCursor &arrowCursor = QCursor();
-static const QCursor &waitCursor = QCursor();
-
-// class KCursor ===============================================================
+#include <qcursor.h>
class KCursor {
public:
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static void setAutoHideCursor(QWidget *w, bool enable);
static QCursor arrowCursor();
static QCursor crossCursor();
+ static QCursor handCursor();
static QCursor sizeAllCursor();
static QCursor sizeHorCursor();
static QCursor sizeVerCursor();
@@ -60,35 +45,8 @@ public:
static QCursor waitCursor();
static QCursor whatsThisCursor();
- // constructors, copy constructors, and destructors ------------------------
-
- KCursor();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KCursor() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCursor(const KCursor &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCursor &operator=(const KCursor &);
-#endif
+};
-}; // class KCursor ============================================================
+extern const QCursor &waitCursor;
#endif
diff --git a/WebCore/kwq/KWQKCursor.mm b/WebCore/kwq/KWQKCursor.mm
index 01e0563..f9f1a76 100644
--- a/WebCore/kwq/KWQKCursor.mm
+++ b/WebCore/kwq/KWQKCursor.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,10 +25,13 @@
#include <kcursor.h>
+const QCursor &waitCursor = KCursor::waitCursor();
+
void KCursor::setAutoHideCursor(QWidget *w, bool enable) {}
QCursor KCursor::arrowCursor() { return QCursor(); }
QCursor KCursor::crossCursor() { return QCursor(); }
+QCursor KCursor::handCursor() { return QCursor(); }
QCursor KCursor::sizeAllCursor() { return QCursor(); }
QCursor KCursor::sizeHorCursor() { return QCursor(); }
QCursor KCursor::sizeVerCursor() { return QCursor(); }
@@ -37,9 +40,3 @@ QCursor KCursor::sizeFDiagCursor() { return QCursor(); }
QCursor KCursor::ibeamCursor() { return QCursor(); }
QCursor KCursor::waitCursor() { return QCursor(); }
QCursor KCursor::whatsThisCursor() { return QCursor(); }
-
-
-KCursor::KCursor()
-{
-}
-
diff --git a/WebCore/kwq/KWQKHTMLFactory.h b/WebCore/kwq/KWQKHTMLFactory.h
index 04ca795..b955144 100644
--- a/WebCore/kwq/KWQKHTMLFactory.h
+++ b/WebCore/kwq/KWQKHTMLFactory.h
@@ -1,42 +1,42 @@
-/* This file is part of the KDE project
+/*
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
+ * 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 library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * 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.
*/
+
#ifndef __khtml_factory_h__
#define __khtml_factory_h__
+#include <khtml_part.h>
#include <kparts/factory.h>
#include <kparts/historyprovider.h>
-#include <qlist.h>
class KInstance;
-class HistoryProvider;
class KHTMLPart;
class KHTMLSettings;
-class KHTMLFactory : public KParts::Factory
+class KHTMLFactory
{
public:
- KHTMLFactory( bool clone = false );
- virtual ~KHTMLFactory();
-
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &args );
-
static KInstance *instance();
static KHTMLSettings *defaultHTMLSettings();
@@ -45,9 +45,9 @@ public:
static KParts::HistoryProvider *vLinks() {
return KParts::HistoryProvider::self();
}
-
-private:
- static QPtrList<KHTMLPart> *s_parts;
+
+ static void registerPart(KHTMLPart *) { }
+ static void deregisterPart(KHTMLPart *) { }
};
#endif
diff --git a/WebCore/kwq/KWQKHTMLFactory.mm b/WebCore/kwq/KWQKHTMLFactory.mm
index 5ba4ac6..1ef11ae 100644
--- a/WebCore/kwq/KWQKHTMLFactory.mm
+++ b/WebCore/kwq/KWQKHTMLFactory.mm
@@ -1,55 +1,41 @@
-/* This file is part of the KDE project
-*
-* Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Library General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Library General Public License for more details.
-*
-* You should have received a copy of the GNU Library General Public License
-* along with this library; see the file COPYING.LIB. If not, write to
-* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*/
-#include <kwqdebug.h>
-#include <khtml_factory.h>
-
-QPtrList<KHTMLPart> *KHTMLFactory::s_parts;
-
-
-KHTMLFactory::KHTMLFactory( bool clone = false )
-{
- _logNotYetImplemented();
-}
-
-KHTMLFactory::~KHTMLFactory()
-{
- _logNotYetImplemented();
-}
+/*
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. 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.
+ */
-KParts::Part *KHTMLFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &args )
-{
- _logNotYetImplemented();
- return 0L;
-}
+#include <khtml_factory.h>
+#include <kinstance.h>
+#include <khtml_settings.h>
KInstance *KHTMLFactory::instance()
{
- _logNotYetImplemented();
- return 0L;
+ static KInstance instance;
+ return &instance;
}
-
KHTMLSettings *KHTMLFactory::defaultHTMLSettings()
{
- _logNotYetImplemented();
- return 0L;
+ static KHTMLSettings settings;
+ return &settings;
}
-
diff --git a/WebCore/kwq/KWQGlobal.mm b/WebCore/kwq/KWQKHTMLFind.h
similarity index 90%
copy from WebCore/kwq/KWQGlobal.mm
copy to WebCore/kwq/KWQKHTMLFind.h
index 013222c..a90715c 100644
--- a/WebCore/kwq/KWQGlobal.mm
+++ b/WebCore/kwq/KWQKHTMLFind.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,11 +23,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-void qDebug(const char *msg, ...)
-{
-}
-
-void qWarning(const char *msg, ...)
-{
-}
-
+class KHTMLFind;
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/KWQKHTMLPageCache.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/KWQKHTMLPageCache.h
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index f720b5f..989fe0e 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1,30 +1,6 @@
// -*- c-basic-offset: 2 -*-
-/* This file is part of the KDE project
- *
- * Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
- * 1999 Lars Knoll <knoll at kde.org>
- * 1999 Antti Koivisto <koivisto at kde.org>
- * 2000 Simon Hausmann <hausmann at kde.org>
- * 2000 Stefan Schimanski <1Stein at gmx.de>
- * 2001 George Staikos <staikos at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
/*
- * Copyright (C) 2001-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -79,7 +55,9 @@
#include <kurl.h>
#include <khtmlview.h>
+#include <qdatetime.h>
#include <khtml_part.h>
+#include <khtmlpart_p.h>
#include <khtml_events.h>
#import <WCPluginWidget.h>
@@ -92,14 +70,14 @@
#include <external.h>
+#undef _KWQ_TIMING
+
WCIFWebDataSourceMakeFunc WCIFWebDataSourceMake;
void WCSetIFWebDataSourceMakeFunc(WCIFWebDataSourceMakeFunc func)
{
WCIFWebDataSourceMake = func;
}
-static bool cache_init = false;
-
static void recursive(const DOM::Node &pNode, const DOM::Node &node)
{
DOM::Node cur_child = node.lastChild();
@@ -113,116 +91,6 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
}
}
-
-// Class KHTMLPartPrivate ================================================================================
-
-class KHTMLPartPrivate
-{
-public:
- KHTMLView *m_view;
-
- DOM::DocumentImpl *m_doc;
- khtml::Decoder *m_decoder;
-
- QString m_encoding;
- QFont::CharSet m_charset;
- KHTMLSettings *m_settings;
-
- KURL m_workingURL;
- KURL m_url;
- KURL m_baseURL;
-
- KHTMLPart *m_part;
- id m_handle;
-
- bool m_bFirstData:1;
- bool m_haveEncoding:1;
- bool m_haveCharset:1;
- bool m_onlyLocalReferences:1;
- bool m_startBeforeEnd:1;
-
- bool m_decodingStarted:1;
-
- KJSProxy *m_jscript;
- int m_runningScripts;
-
- QString m_strSelectedURL;
- QString m_strSelectedURLTarget;
- QString m_referrer;
- QString m_documentSource;
-
- QString m_redirectURL;
- int m_delayRedirect;
- int m_redirectionTimer;
-
- bool m_bMousePressed;
- DOM::Node m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
- DOM::Node m_selectionStart;
- long m_startOffset;
- DOM::Node m_selectionEnd;
- long m_endOffset;
- QString m_overURL;
-
- QPoint m_dragStartPos;
-#ifdef KHTML_NO_SELECTION
- QPoint m_dragLastPos;
-#endif
-
-#ifdef _KWQ_TIMING
- double totalWriteTime;
-#endif
-
- QString m_sheetUsed;
-
- QValueList<QString> plugins;
-
- IFWebDataSource *m_dataSource;
-
- KHTMLPartPrivate(KHTMLPart *part)
- {
- if (!cache_init) {
- khtml::Cache::init();
- cache_init = true;
- }
- m_part = part;
- m_view = 0L;
-
- // Why is this allocated here?
- m_doc = NULL;
-
- m_decoder = 0L;
- m_bFirstData = true;
- //m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
- m_settings = new KHTMLSettings();
- m_haveEncoding = false;
- m_handle = nil;
-
- m_jscript = 0L;
- m_runningScripts = 0;
- m_onlyLocalReferences = 0;
-
- m_documentSource = "";
- m_decodingStarted = 0;
-
- m_dataSource = 0;
-
- m_redirectURL = QString::null;
- m_delayRedirect = 0;
- }
-
- ~KHTMLPartPrivate()
- {
- delete m_settings;
- if (m_decoder)
- delete m_decoder;
- if (m_jscript != 0) {
- delete m_jscript;
- KJS::Collector::collect();
- }
- }
-
-};
-
#if 0
static QString splitUrlTarget(const QString &url, QString *target=0)
{
@@ -253,31 +121,16 @@ static QString splitUrlTarget(const QString &url, QString *target=0)
}
#endif
-KHTMLPart::KHTMLPart( QWidget *, const char *, QObject *, const char *, GUIProfile )
+KHTMLPart::KHTMLPart(QWidget *, const char *, QObject *, const char *, GUIProfile prof)
{
- d = new KHTMLPartPrivate(this);
_ref = 1;
-}
-
-KHTMLPart::~KHTMLPart()
-{
- killTimers();
-
- if ( d->m_doc != NULL ) {
- d->m_doc->detach();
-
- d->m_doc->deref();
- }
-
- d->m_doc = 0;
-
- delete d;
+ init(0, prof);
}
bool KHTMLPart::openURL( const KURL &url )
{
d->m_workingURL = url;
- d->m_url = url;
+ m_url = url;
d->m_documentSource = "";
d->m_decodingStarted = 0;
@@ -285,153 +138,6 @@ bool KHTMLPart::openURL( const KURL &url )
return true;
}
-bool KHTMLPart::closeURL()
-{
- // Reset the the current working URL to the default URL.
- d->m_workingURL = KURL();
-
- //d->m_doc = 0;
-
- return true;
-}
-
-DOM::HTMLDocument KHTMLPart::htmlDocument() const
-{
- if (d->m_doc && d->m_doc->isHTMLDocument())
- return static_cast<HTMLDocumentImpl*>(d->m_doc);
- else
- return static_cast<HTMLDocumentImpl*>(0);
-}
-
-DOM::Document KHTMLPart::document() const
-{
- return d->m_doc;
-}
-
-KParts::BrowserExtension *KHTMLPart::browserExtension() const
-{
- _logNeverImplemented();
- return 0L;
-}
-
-KHTMLView *KHTMLPart::view() const
-{
- return d->m_view;
-}
-
-bool KHTMLPart::jScriptEnabled() const
-{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitJScriptEnabled"] boolValue];
-}
-
-bool KHTMLPart::metaRefreshEnabled() const
-{
- _logNotYetImplemented();
- return TRUE;
-}
-
-extern "C" { KJSProxy *kjs_html_init(KHTMLPart *khtmlpart); }
-
-KJSProxy *KHTMLPart::jScript()
-{
- if (!jScriptEnabled()) return 0;
-
- if ( !d->m_jscript )
- {
- d->m_jscript = kjs_html_init(this);
- }
-
- return d->m_jscript;
-}
-
-QVariant KHTMLPart::executeScript( const QString &script )
-{
-// DUBIOUS, rather than executing the script this document should be
-// passed to the interpreter.
- return executeScript( DOM::Node(), script );
-}
-
-QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
-{
- return executeScript(QString::null, 0, n, script);
-}
-
-QVariant KHTMLPart::executeScript(QString filename, int baseLine, const DOM::Node &n, const QString &script)
-{
-// DUBIOUS, rather than executing the script this document should be
-// passed to the interpreter.
- KJSProxy *proxy = jScript();
-
- if (!proxy || proxy->paused())
- return QVariant();
- d->m_runningScripts++;
- QVariant ret = proxy->evaluate( filename, baseLine, script, n );
- d->m_runningScripts--;
-
- // FIXME: implement
-#ifndef APPLE_CHANGES
- if (!d->m_runningScripts && d->m_doc && !d->m_doc->parsing() && d->m_submitForm )
- submitFormAgain();
-#endif /* not APPLE_CHANGES */
-
- DocumentImpl::updateDocumentsRendering();
-
- //kdDebug(6050) << "KHTMLPart::executeScript - done" << endl;
- return ret;
-}
-
-QVariant KHTMLPart::executeScheduledScript()
-{
- _logNeverImplemented();
- return QVariant();
-}
-
-bool KHTMLPart::javaEnabled() const
-{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitJavaEnabled"] boolValue];
-}
-
-KJavaAppletContext *KHTMLPart::javaContext()
-{
- _logNotYetImplemented();
- return 0L;
-}
-
-KJavaAppletContext *KHTMLPart::createJavaContext()
-{
- _logNotYetImplemented();
- return 0L;
-}
-
-bool KHTMLPart::pluginsEnabled() const
-{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitPluginsEnabled"] boolValue];
-}
-
-void KHTMLPart::setAutoloadImages( bool enable )
-{
- _logNeverImplemented();
-}
-
-bool KHTMLPart::autoloadImages() const
-{
- _logNeverImplemented();
- return FALSE;
-}
-
-DOM::HTMLDocumentImpl *KHTMLPart::docImpl() const
-{
- _logPartiallyImplemented();
- return dynamic_cast<DOM::HTMLDocumentImpl *>(d->m_doc);
-}
-
-DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
-{
- if ( d )
- return d->m_doc;
- return 0;
-}
-
void KHTMLPart::slotData(NSString *encoding, const char *bytes, int length)
{
// NOTE: This code emulates the interface used by the original khtml part
@@ -453,7 +159,7 @@ void KHTMLPart::slotData(NSString *encoding, const char *bytes, int length)
// FIXME [rjw]: Remove this log eventually. Should never happen. For debugging
// purposes only.
if (d->m_doc == 0){
- fprintf (stderr, "ERROR: KHTMLPart::slotData m_doc == 0 IGNORING DATA, url = %s\n", d->m_url.url().latin1());
+ fprintf (stderr, "ERROR: KHTMLPart::slotData m_doc == 0 IGNORING DATA, url = %s\n", m_url.url().latin1());
return;
}
@@ -471,7 +177,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
#endif
// d->m_referrer = url.url();
- d->m_url = url;
+ m_url = url;
KURL baseurl;
// ### not sure if XHTML documents served as text/xml should use DocumentImpl or HTMLDocumentImpl
@@ -612,7 +318,7 @@ void KHTMLPart::write( const char *str, int len )
// end lines added in lieu of big fixme
if (jScript())
- jScript()->appendSourceFile(d->m_url.url(),decoded);
+ jScript()->appendSourceFile(m_url.url(),decoded);
Tokenizer* t = d->m_doc->tokenizer();
if(t)
t->write( decoded, true );
@@ -620,33 +326,10 @@ void KHTMLPart::write( const char *str, int len )
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
d->totalWriteTime += thisTime;
- KWQDEBUGLEVEL (0x200, "%s bytes = %d, seconds = %f, total = %f\n", d->m_url.url().latin1(), len, thisTime, d->totalWriteTime);
+ KWQDEBUGLEVEL (0x200, "%s bytes = %d, seconds = %f, total = %f\n", m_url.url().latin1(), len, thisTime, d->totalWriteTime);
#endif
}
-void KHTMLPart::write( const QString &str )
-{
- // FIXME [rjw]: Remove this log eventually. Should never happen. For debugging
- // purposes only.
- if (d->m_doc == 0){
- fprintf (stderr, "WARNING: KHTMLPart::write m_doc == 0\n");
- }
-
- if ( str.isNull() )
- return;
-
- if(d->m_bFirstData) {
- // determine the parse mode
- d->m_doc->setParseMode( DocumentImpl::Strict );
- d->m_bFirstData = false;
- }
- if (jScript())
- jScript()->appendSourceFile(d->m_url.url(),str);
- Tokenizer* t = d->m_doc->tokenizer();
- if(t)
- t->write( str, true );
-}
-
void KHTMLPart::end()
{
// FIXME [rjw]: Remove this log eventually. Should never happen. For debugging
@@ -656,14 +339,6 @@ void KHTMLPart::end()
return;
}
-#ifndef APPLE_CHANGES
- KWQDEBUG ("0x%08x end(): for url %s\n", (unsigned int)this, d->m_url.url().latin1());
- // make sure nothing's left in there...
- if(d->m_decoder)
- write(d->m_decoder->flush());
- d->m_doc->finishParsing();
-#endif /* not APPLE_CHANGES */
-
d->m_doc->setParsing(false);
d->m_doc->close();
@@ -674,50 +349,11 @@ void KHTMLPart::end()
bool KHTMLPart::gotoBaseAnchor()
{
- if ( !d->m_url.ref().isEmpty() )
- return gotoAnchor( d->m_url.ref() );
+ if ( !m_url.ref().isEmpty() )
+ return gotoAnchor( m_url.ref() );
return false;
}
-bool KHTMLPart::gotoAnchor( const QString &name )
-{
- if (!d->m_doc)
- return false;
-
- HTMLCollectionImpl *anchors =
- new HTMLCollectionImpl( d->m_doc, HTMLCollectionImpl::DOC_ANCHORS);
- anchors->ref();
- NodeImpl *n = anchors->namedItem(name);
- anchors->deref();
-
- if(!n) {
- //kdDebug(6050) << "KHTMLPart::gotoAnchor node '" << name << "' not found" << endl;
- return false;
- }
-
- int x = 0, y = 0;
- HTMLElementImpl *a = static_cast<HTMLElementImpl *>(n);
- a->getUpperLeftCorner(x, y);
- d->m_view->setContentsPos(x, y);
-
- return true;
-}
-
-const KHTMLSettings *KHTMLPart::settings() const
-{
- return d->m_settings;
-}
-
-KURL KHTMLPart::completeURL(const QString &url)
-{
- if ( !d->m_doc ) return url;
-
- if (d->m_decoder)
- return KURL(d->m_doc->completeURL(url), d->m_decoder->codec()->mibEnum());
-
- return KURL( d->m_doc->completeURL( url ) );
-}
-
void KHTMLPart::scheduleRedirection( int delay, const QString &url, bool )
{
if( d->m_redirectURL.isEmpty() || delay < d->m_delayRedirect )
@@ -768,120 +404,6 @@ void KHTMLPart::redirectJS()
-bool KHTMLPart::setEncoding( const QString &name, bool override )
-{
- d->m_encoding = name;
- d->m_haveEncoding = override;
-
- _logPartiallyImplemented();
- return false;
-#ifndef APPLE_CHANGES
-/* FIXME: do we need any of these bits? */
-// setCharset( name, override );
- d->m_charset = KGlobal::charsets()->charsetForEncoding(name);
- d->m_settings->setCharset( d->m_charset );
- // the script should not be unicode. We need to know the document is eg. arabic to be
- // able to choose a unicode font that contains arabic glyphs.
- d->m_settings->setScript( KGlobal::charsets()->charsetForEncoding( name, true ) );
-
- if( !m_url.isEmpty() ) {
- // reload document
- closeURL();
- KURL url = m_url;
- m_url = 0;
- openURL(url);
- }
-
- return true;
-#endif /* not APPLE_CHANGES */
-}
-
-QString KHTMLPart::encoding() const
-{
- _logNeverImplemented();
- return d->m_settings->encoding();
-}
-
-void KHTMLPart::setUserStyleSheet(const KURL &url)
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setUserStyleSheet(const QString &styleSheet)
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setStandardFont( const QString &name )
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setFixedFont( const QString &name )
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setURLCursor( const QCursor &c )
-{
- _logNeverImplemented();
-}
-
-// FIXME: this should be removed
-static const QCursor *staticURLCursor = NULL;
-
-QCursor KHTMLPart::urlCursor() const
-{
- _logNeverImplemented();
- if (staticURLCursor == NULL) {
- staticURLCursor = new QCursor();
- }
- return *staticURLCursor;
-}
-
-bool KHTMLPart::onlyLocalReferences() const
-{
- return d->m_onlyLocalReferences;
-}
-
-void KHTMLPart::setOnlyLocalReferences(bool enable)
-{
- d->m_onlyLocalReferences = enable;
-}
-
-void KHTMLPart::findTextBegin()
-{
-// DUBIOUS, perhaps searching should be handled externally
- _logNeverImplemented();
-}
-
-QString KHTMLPart::selectedText() const
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
- return QString();
-}
-
-bool KHTMLPart::hasSelection() const
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
- return FALSE;
-}
-
-DOM::Range KHTMLPart::selection() const
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
- return DOM::Range();
-}
-
-void KHTMLPart::setSelection( const DOM::Range & )
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
-}
-
void KHTMLPart::urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs )
{
IFWebDataSource *oldDataSource, *newDataSource;
@@ -889,10 +411,10 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
IFWebFrame *frame;
KURL refLess(clickedURL);
- d->m_url.setRef ("");
+ m_url.setRef ("");
refLess.setRef ("");
- if (refLess.url() == d->m_url.url()){
- d->m_url = clickedURL;
+ if (refLess.url() == m_url.url()){
+ m_url = clickedURL;
gotoAnchor (clickedURL.ref());
return;
}
@@ -984,25 +506,14 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
return true;
}
-static int frameNameId = 1;
-
-QString KHTMLPart::requestFrameName()
-{
- return QString::fromLatin1("<!--frame %1-->").arg(frameNameId++);
-}
-
bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, const QString &serviceType,
const QStringList &args )
{
- if(url.isEmpty()){
- return FALSE;
+ if (url.isEmpty()) {
+ return false;
}
- // requestObject can be called multiple times for a single plug-in.
- // The plugins array is an attempt to avoid multiple creations of the same plug-in.
- // FIXME: Can't have multiple plug-ins with the same URL on a page
- if(!d->plugins.contains(url)) {
+ if (!frame->widget()) {
frame->setWidget(IFPluginWidgetCreate(completeURL(url).url(), serviceType, args, d->m_baseURL.url()));
- d->plugins.append(url);
}
return true;
}
@@ -1013,7 +524,6 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *frame, const KURL &url, const
return false;
}
-
void KHTMLPart::submitForm( const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary )
{
QString target = _target;
@@ -1128,48 +638,7 @@ bool KHTMLPart::frameExists( const QString &frameName )
return [getDataSource() frameExists: (NSString *)frameName.getCFMutableString()];
}
-KHTMLPart *KHTMLPart::parentPart()
-{
- _logNeverImplemented();
- return 0L;
-}
-
-void KHTMLPart::setJSStatusBarText( const QString &text )
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setJSDefaultStatusBarText( const QString &text )
-{
- _logNeverImplemented();
-}
-
-QString KHTMLPart::referrer() const
-{
- _logNeverImplemented();
- return QString();
-}
-
-QString KHTMLPart::lastModified() const
-{
- _logNeverImplemented();
- return QString();
-}
-
-QString KHTMLPart::jsStatusBarText() const
-{
- _logNeverImplemented();
- return QString();
-}
-
-QString KHTMLPart::jsDefaultStatusBarText() const
-{
- _logNeverImplemented();
- return QString();
-}
-
QPtrList<KParts::ReadOnlyPart> KHTMLPart::frames() const
-
{
_logNeverImplemented();
return QPtrList<KParts::ReadOnlyPart>();
@@ -1556,46 +1025,6 @@ void KHTMLPart::khtmlDrawContentsEvent( khtml::DrawContentsEvent * )
{
}
-void KHTMLPart::selectAll()
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
-}
-
-DOM::EventListener *KHTMLPart::createHTMLEventListener( QString code )
-{
- KJSProxy *proxy = jScript();
-
- if (!proxy)
- return 0;
-
- //fprintf (stdout, "Creating event listener w/ code %s\n", code.latin1());
-
- return proxy->createHTMLEventHandler( d->m_url.url(), code );
-}
-
-KHTMLPart *KHTMLPart::opener()
-{
- _logNeverImplemented();
- return 0L;
-}
-
-void KHTMLPart::setOpener(KHTMLPart *_opener)
-{
- _logNeverImplemented();
-}
-
-bool KHTMLPart::openedByJS()
-{
- _logNeverImplemented();
- return FALSE;
-}
-
-void KHTMLPart::setOpenedByJS(bool _openedByJS)
-{
- _logNeverImplemented();
-}
-
QString KHTMLPart::documentSource() const
{
return d->m_documentSource;
@@ -1613,14 +1042,6 @@ void KHTMLPart::setBaseURL(const KURL &url)
}
}
-KURL KHTMLPart::baseURL() const
-{
- if (d->m_baseURL.isEmpty()) {
- return d->m_workingURL;
- }
- return d->m_baseURL;
-}
-
void KHTMLPart::setView(KHTMLView *view)
{
d->m_view = view;
@@ -1631,31 +1052,11 @@ void KHTMLPart::nodeActivated(const DOM::Node &aNode)
KWQDEBUG ("name %s = %s\n", (const char *)aNode.nodeName().string(), (const char *)aNode.nodeValue().string());
}
-void KHTMLPart::stopAutoScroll()
-{
- _logNeverImplemented();
-}
-
void KHTMLPart::setTitle(const DOMString &title)
{
[getDataSource() _setTitle:(NSString *)title.string().getCFMutableString()];
}
-QString KHTMLPart::sheetUsed() const
-{
- return d->m_sheetUsed;
-}
-
-void KHTMLPart::setSheetUsed(const QString &qs)
-{
- d->m_sheetUsed = qs;
-}
-
-int KHTMLPart::zoomFactor(void) const
-{
- return 100;
-}
-
void KHTMLPart::setDataSource(IFWebDataSource *dataSource)
{
d->m_dataSource = dataSource; // not retained
@@ -1663,5 +1064,5 @@ void KHTMLPart::setDataSource(IFWebDataSource *dataSource)
IFWebDataSource *KHTMLPart::getDataSource()
{
- return d->m_dataSource;
+ return (IFWebDataSource *)d->m_dataSource;
}
diff --git a/WebCore/kwq/WebCoreTextRendererFactory.h b/WebCore/kwq/KWQKHTMLPartBrowserExtension.h
similarity index 75%
copy from WebCore/kwq/WebCoreTextRendererFactory.h
copy to WebCore/kwq/KWQKHTMLPartBrowserExtension.h
index bf703f1..c9c30f0 100644
--- a/WebCore/kwq/WebCoreTextRendererFactory.h
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.h
@@ -23,16 +23,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <Cocoa/Cocoa.h>
+#include <kparts/browserextension.h>
- at protocol WebCoreTextRenderer;
+class QWidget;
- at interface WebCoreTextRendererFactory : NSObject
-{
-}
+class KHTMLPartBrowserExtension : public KParts::BrowserExtension {
+public:
+ KHTMLPartBrowserExtension(KHTMLPart *) { }
+ void editableWidgetFocused(QWidget *) { }
+ void editableWidgetBlurred(QWidget *) { }
+ void setLocationBarURL(const QString &) { }
+};
-+ (WebCoreTextRendererFactory *)sharedFactory;
-- init;
-- (id <WebCoreTextRenderer>)rendererWithFamily:(NSString *)family traits:(NSFontTraitMask)traits size:(float)size;
+class KHTMLPartBrowserHostExtension {
+public:
+ KHTMLPartBrowserHostExtension(KHTMLPart *) { }
+};
- at end
+class KHTMLZoomFactorAction { };
diff --git a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
index 4881918..e69de29 100644
--- a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. 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 <kwqdebug.h>
-#include <khtml_ext.h>
-
-
-void KHTMLPartBrowserExtension::editableWidgetFocused( QWidget *widget )
-{
- _logNotYetImplemented();
-}
-
-
-void KHTMLPartBrowserExtension::editableWidgetBlurred( QWidget *widget )
-{
- _logNotYetImplemented();
-}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index f720b5f..989fe0e 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -1,30 +1,6 @@
// -*- c-basic-offset: 2 -*-
-/* This file is part of the KDE project
- *
- * Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
- * 1999 Lars Knoll <knoll at kde.org>
- * 1999 Antti Koivisto <koivisto at kde.org>
- * 2000 Simon Hausmann <hausmann at kde.org>
- * 2000 Stefan Schimanski <1Stein at gmx.de>
- * 2001 George Staikos <staikos at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
/*
- * Copyright (C) 2001-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -79,7 +55,9 @@
#include <kurl.h>
#include <khtmlview.h>
+#include <qdatetime.h>
#include <khtml_part.h>
+#include <khtmlpart_p.h>
#include <khtml_events.h>
#import <WCPluginWidget.h>
@@ -92,14 +70,14 @@
#include <external.h>
+#undef _KWQ_TIMING
+
WCIFWebDataSourceMakeFunc WCIFWebDataSourceMake;
void WCSetIFWebDataSourceMakeFunc(WCIFWebDataSourceMakeFunc func)
{
WCIFWebDataSourceMake = func;
}
-static bool cache_init = false;
-
static void recursive(const DOM::Node &pNode, const DOM::Node &node)
{
DOM::Node cur_child = node.lastChild();
@@ -113,116 +91,6 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
}
}
-
-// Class KHTMLPartPrivate ================================================================================
-
-class KHTMLPartPrivate
-{
-public:
- KHTMLView *m_view;
-
- DOM::DocumentImpl *m_doc;
- khtml::Decoder *m_decoder;
-
- QString m_encoding;
- QFont::CharSet m_charset;
- KHTMLSettings *m_settings;
-
- KURL m_workingURL;
- KURL m_url;
- KURL m_baseURL;
-
- KHTMLPart *m_part;
- id m_handle;
-
- bool m_bFirstData:1;
- bool m_haveEncoding:1;
- bool m_haveCharset:1;
- bool m_onlyLocalReferences:1;
- bool m_startBeforeEnd:1;
-
- bool m_decodingStarted:1;
-
- KJSProxy *m_jscript;
- int m_runningScripts;
-
- QString m_strSelectedURL;
- QString m_strSelectedURLTarget;
- QString m_referrer;
- QString m_documentSource;
-
- QString m_redirectURL;
- int m_delayRedirect;
- int m_redirectionTimer;
-
- bool m_bMousePressed;
- DOM::Node m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
- DOM::Node m_selectionStart;
- long m_startOffset;
- DOM::Node m_selectionEnd;
- long m_endOffset;
- QString m_overURL;
-
- QPoint m_dragStartPos;
-#ifdef KHTML_NO_SELECTION
- QPoint m_dragLastPos;
-#endif
-
-#ifdef _KWQ_TIMING
- double totalWriteTime;
-#endif
-
- QString m_sheetUsed;
-
- QValueList<QString> plugins;
-
- IFWebDataSource *m_dataSource;
-
- KHTMLPartPrivate(KHTMLPart *part)
- {
- if (!cache_init) {
- khtml::Cache::init();
- cache_init = true;
- }
- m_part = part;
- m_view = 0L;
-
- // Why is this allocated here?
- m_doc = NULL;
-
- m_decoder = 0L;
- m_bFirstData = true;
- //m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
- m_settings = new KHTMLSettings();
- m_haveEncoding = false;
- m_handle = nil;
-
- m_jscript = 0L;
- m_runningScripts = 0;
- m_onlyLocalReferences = 0;
-
- m_documentSource = "";
- m_decodingStarted = 0;
-
- m_dataSource = 0;
-
- m_redirectURL = QString::null;
- m_delayRedirect = 0;
- }
-
- ~KHTMLPartPrivate()
- {
- delete m_settings;
- if (m_decoder)
- delete m_decoder;
- if (m_jscript != 0) {
- delete m_jscript;
- KJS::Collector::collect();
- }
- }
-
-};
-
#if 0
static QString splitUrlTarget(const QString &url, QString *target=0)
{
@@ -253,31 +121,16 @@ static QString splitUrlTarget(const QString &url, QString *target=0)
}
#endif
-KHTMLPart::KHTMLPart( QWidget *, const char *, QObject *, const char *, GUIProfile )
+KHTMLPart::KHTMLPart(QWidget *, const char *, QObject *, const char *, GUIProfile prof)
{
- d = new KHTMLPartPrivate(this);
_ref = 1;
-}
-
-KHTMLPart::~KHTMLPart()
-{
- killTimers();
-
- if ( d->m_doc != NULL ) {
- d->m_doc->detach();
-
- d->m_doc->deref();
- }
-
- d->m_doc = 0;
-
- delete d;
+ init(0, prof);
}
bool KHTMLPart::openURL( const KURL &url )
{
d->m_workingURL = url;
- d->m_url = url;
+ m_url = url;
d->m_documentSource = "";
d->m_decodingStarted = 0;
@@ -285,153 +138,6 @@ bool KHTMLPart::openURL( const KURL &url )
return true;
}
-bool KHTMLPart::closeURL()
-{
- // Reset the the current working URL to the default URL.
- d->m_workingURL = KURL();
-
- //d->m_doc = 0;
-
- return true;
-}
-
-DOM::HTMLDocument KHTMLPart::htmlDocument() const
-{
- if (d->m_doc && d->m_doc->isHTMLDocument())
- return static_cast<HTMLDocumentImpl*>(d->m_doc);
- else
- return static_cast<HTMLDocumentImpl*>(0);
-}
-
-DOM::Document KHTMLPart::document() const
-{
- return d->m_doc;
-}
-
-KParts::BrowserExtension *KHTMLPart::browserExtension() const
-{
- _logNeverImplemented();
- return 0L;
-}
-
-KHTMLView *KHTMLPart::view() const
-{
- return d->m_view;
-}
-
-bool KHTMLPart::jScriptEnabled() const
-{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitJScriptEnabled"] boolValue];
-}
-
-bool KHTMLPart::metaRefreshEnabled() const
-{
- _logNotYetImplemented();
- return TRUE;
-}
-
-extern "C" { KJSProxy *kjs_html_init(KHTMLPart *khtmlpart); }
-
-KJSProxy *KHTMLPart::jScript()
-{
- if (!jScriptEnabled()) return 0;
-
- if ( !d->m_jscript )
- {
- d->m_jscript = kjs_html_init(this);
- }
-
- return d->m_jscript;
-}
-
-QVariant KHTMLPart::executeScript( const QString &script )
-{
-// DUBIOUS, rather than executing the script this document should be
-// passed to the interpreter.
- return executeScript( DOM::Node(), script );
-}
-
-QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
-{
- return executeScript(QString::null, 0, n, script);
-}
-
-QVariant KHTMLPart::executeScript(QString filename, int baseLine, const DOM::Node &n, const QString &script)
-{
-// DUBIOUS, rather than executing the script this document should be
-// passed to the interpreter.
- KJSProxy *proxy = jScript();
-
- if (!proxy || proxy->paused())
- return QVariant();
- d->m_runningScripts++;
- QVariant ret = proxy->evaluate( filename, baseLine, script, n );
- d->m_runningScripts--;
-
- // FIXME: implement
-#ifndef APPLE_CHANGES
- if (!d->m_runningScripts && d->m_doc && !d->m_doc->parsing() && d->m_submitForm )
- submitFormAgain();
-#endif /* not APPLE_CHANGES */
-
- DocumentImpl::updateDocumentsRendering();
-
- //kdDebug(6050) << "KHTMLPart::executeScript - done" << endl;
- return ret;
-}
-
-QVariant KHTMLPart::executeScheduledScript()
-{
- _logNeverImplemented();
- return QVariant();
-}
-
-bool KHTMLPart::javaEnabled() const
-{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitJavaEnabled"] boolValue];
-}
-
-KJavaAppletContext *KHTMLPart::javaContext()
-{
- _logNotYetImplemented();
- return 0L;
-}
-
-KJavaAppletContext *KHTMLPart::createJavaContext()
-{
- _logNotYetImplemented();
- return 0L;
-}
-
-bool KHTMLPart::pluginsEnabled() const
-{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitPluginsEnabled"] boolValue];
-}
-
-void KHTMLPart::setAutoloadImages( bool enable )
-{
- _logNeverImplemented();
-}
-
-bool KHTMLPart::autoloadImages() const
-{
- _logNeverImplemented();
- return FALSE;
-}
-
-DOM::HTMLDocumentImpl *KHTMLPart::docImpl() const
-{
- _logPartiallyImplemented();
- return dynamic_cast<DOM::HTMLDocumentImpl *>(d->m_doc);
-}
-
-DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
-{
- if ( d )
- return d->m_doc;
- return 0;
-}
-
void KHTMLPart::slotData(NSString *encoding, const char *bytes, int length)
{
// NOTE: This code emulates the interface used by the original khtml part
@@ -453,7 +159,7 @@ void KHTMLPart::slotData(NSString *encoding, const char *bytes, int length)
// FIXME [rjw]: Remove this log eventually. Should never happen. For debugging
// purposes only.
if (d->m_doc == 0){
- fprintf (stderr, "ERROR: KHTMLPart::slotData m_doc == 0 IGNORING DATA, url = %s\n", d->m_url.url().latin1());
+ fprintf (stderr, "ERROR: KHTMLPart::slotData m_doc == 0 IGNORING DATA, url = %s\n", m_url.url().latin1());
return;
}
@@ -471,7 +177,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
#endif
// d->m_referrer = url.url();
- d->m_url = url;
+ m_url = url;
KURL baseurl;
// ### not sure if XHTML documents served as text/xml should use DocumentImpl or HTMLDocumentImpl
@@ -612,7 +318,7 @@ void KHTMLPart::write( const char *str, int len )
// end lines added in lieu of big fixme
if (jScript())
- jScript()->appendSourceFile(d->m_url.url(),decoded);
+ jScript()->appendSourceFile(m_url.url(),decoded);
Tokenizer* t = d->m_doc->tokenizer();
if(t)
t->write( decoded, true );
@@ -620,33 +326,10 @@ void KHTMLPart::write( const char *str, int len )
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
d->totalWriteTime += thisTime;
- KWQDEBUGLEVEL (0x200, "%s bytes = %d, seconds = %f, total = %f\n", d->m_url.url().latin1(), len, thisTime, d->totalWriteTime);
+ KWQDEBUGLEVEL (0x200, "%s bytes = %d, seconds = %f, total = %f\n", m_url.url().latin1(), len, thisTime, d->totalWriteTime);
#endif
}
-void KHTMLPart::write( const QString &str )
-{
- // FIXME [rjw]: Remove this log eventually. Should never happen. For debugging
- // purposes only.
- if (d->m_doc == 0){
- fprintf (stderr, "WARNING: KHTMLPart::write m_doc == 0\n");
- }
-
- if ( str.isNull() )
- return;
-
- if(d->m_bFirstData) {
- // determine the parse mode
- d->m_doc->setParseMode( DocumentImpl::Strict );
- d->m_bFirstData = false;
- }
- if (jScript())
- jScript()->appendSourceFile(d->m_url.url(),str);
- Tokenizer* t = d->m_doc->tokenizer();
- if(t)
- t->write( str, true );
-}
-
void KHTMLPart::end()
{
// FIXME [rjw]: Remove this log eventually. Should never happen. For debugging
@@ -656,14 +339,6 @@ void KHTMLPart::end()
return;
}
-#ifndef APPLE_CHANGES
- KWQDEBUG ("0x%08x end(): for url %s\n", (unsigned int)this, d->m_url.url().latin1());
- // make sure nothing's left in there...
- if(d->m_decoder)
- write(d->m_decoder->flush());
- d->m_doc->finishParsing();
-#endif /* not APPLE_CHANGES */
-
d->m_doc->setParsing(false);
d->m_doc->close();
@@ -674,50 +349,11 @@ void KHTMLPart::end()
bool KHTMLPart::gotoBaseAnchor()
{
- if ( !d->m_url.ref().isEmpty() )
- return gotoAnchor( d->m_url.ref() );
+ if ( !m_url.ref().isEmpty() )
+ return gotoAnchor( m_url.ref() );
return false;
}
-bool KHTMLPart::gotoAnchor( const QString &name )
-{
- if (!d->m_doc)
- return false;
-
- HTMLCollectionImpl *anchors =
- new HTMLCollectionImpl( d->m_doc, HTMLCollectionImpl::DOC_ANCHORS);
- anchors->ref();
- NodeImpl *n = anchors->namedItem(name);
- anchors->deref();
-
- if(!n) {
- //kdDebug(6050) << "KHTMLPart::gotoAnchor node '" << name << "' not found" << endl;
- return false;
- }
-
- int x = 0, y = 0;
- HTMLElementImpl *a = static_cast<HTMLElementImpl *>(n);
- a->getUpperLeftCorner(x, y);
- d->m_view->setContentsPos(x, y);
-
- return true;
-}
-
-const KHTMLSettings *KHTMLPart::settings() const
-{
- return d->m_settings;
-}
-
-KURL KHTMLPart::completeURL(const QString &url)
-{
- if ( !d->m_doc ) return url;
-
- if (d->m_decoder)
- return KURL(d->m_doc->completeURL(url), d->m_decoder->codec()->mibEnum());
-
- return KURL( d->m_doc->completeURL( url ) );
-}
-
void KHTMLPart::scheduleRedirection( int delay, const QString &url, bool )
{
if( d->m_redirectURL.isEmpty() || delay < d->m_delayRedirect )
@@ -768,120 +404,6 @@ void KHTMLPart::redirectJS()
-bool KHTMLPart::setEncoding( const QString &name, bool override )
-{
- d->m_encoding = name;
- d->m_haveEncoding = override;
-
- _logPartiallyImplemented();
- return false;
-#ifndef APPLE_CHANGES
-/* FIXME: do we need any of these bits? */
-// setCharset( name, override );
- d->m_charset = KGlobal::charsets()->charsetForEncoding(name);
- d->m_settings->setCharset( d->m_charset );
- // the script should not be unicode. We need to know the document is eg. arabic to be
- // able to choose a unicode font that contains arabic glyphs.
- d->m_settings->setScript( KGlobal::charsets()->charsetForEncoding( name, true ) );
-
- if( !m_url.isEmpty() ) {
- // reload document
- closeURL();
- KURL url = m_url;
- m_url = 0;
- openURL(url);
- }
-
- return true;
-#endif /* not APPLE_CHANGES */
-}
-
-QString KHTMLPart::encoding() const
-{
- _logNeverImplemented();
- return d->m_settings->encoding();
-}
-
-void KHTMLPart::setUserStyleSheet(const KURL &url)
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setUserStyleSheet(const QString &styleSheet)
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setStandardFont( const QString &name )
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setFixedFont( const QString &name )
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setURLCursor( const QCursor &c )
-{
- _logNeverImplemented();
-}
-
-// FIXME: this should be removed
-static const QCursor *staticURLCursor = NULL;
-
-QCursor KHTMLPart::urlCursor() const
-{
- _logNeverImplemented();
- if (staticURLCursor == NULL) {
- staticURLCursor = new QCursor();
- }
- return *staticURLCursor;
-}
-
-bool KHTMLPart::onlyLocalReferences() const
-{
- return d->m_onlyLocalReferences;
-}
-
-void KHTMLPart::setOnlyLocalReferences(bool enable)
-{
- d->m_onlyLocalReferences = enable;
-}
-
-void KHTMLPart::findTextBegin()
-{
-// DUBIOUS, perhaps searching should be handled externally
- _logNeverImplemented();
-}
-
-QString KHTMLPart::selectedText() const
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
- return QString();
-}
-
-bool KHTMLPart::hasSelection() const
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
- return FALSE;
-}
-
-DOM::Range KHTMLPart::selection() const
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
- return DOM::Range();
-}
-
-void KHTMLPart::setSelection( const DOM::Range & )
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
-}
-
void KHTMLPart::urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs )
{
IFWebDataSource *oldDataSource, *newDataSource;
@@ -889,10 +411,10 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
IFWebFrame *frame;
KURL refLess(clickedURL);
- d->m_url.setRef ("");
+ m_url.setRef ("");
refLess.setRef ("");
- if (refLess.url() == d->m_url.url()){
- d->m_url = clickedURL;
+ if (refLess.url() == m_url.url()){
+ m_url = clickedURL;
gotoAnchor (clickedURL.ref());
return;
}
@@ -984,25 +506,14 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
return true;
}
-static int frameNameId = 1;
-
-QString KHTMLPart::requestFrameName()
-{
- return QString::fromLatin1("<!--frame %1-->").arg(frameNameId++);
-}
-
bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, const QString &serviceType,
const QStringList &args )
{
- if(url.isEmpty()){
- return FALSE;
+ if (url.isEmpty()) {
+ return false;
}
- // requestObject can be called multiple times for a single plug-in.
- // The plugins array is an attempt to avoid multiple creations of the same plug-in.
- // FIXME: Can't have multiple plug-ins with the same URL on a page
- if(!d->plugins.contains(url)) {
+ if (!frame->widget()) {
frame->setWidget(IFPluginWidgetCreate(completeURL(url).url(), serviceType, args, d->m_baseURL.url()));
- d->plugins.append(url);
}
return true;
}
@@ -1013,7 +524,6 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *frame, const KURL &url, const
return false;
}
-
void KHTMLPart::submitForm( const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary )
{
QString target = _target;
@@ -1128,48 +638,7 @@ bool KHTMLPart::frameExists( const QString &frameName )
return [getDataSource() frameExists: (NSString *)frameName.getCFMutableString()];
}
-KHTMLPart *KHTMLPart::parentPart()
-{
- _logNeverImplemented();
- return 0L;
-}
-
-void KHTMLPart::setJSStatusBarText( const QString &text )
-{
- _logNeverImplemented();
-}
-
-void KHTMLPart::setJSDefaultStatusBarText( const QString &text )
-{
- _logNeverImplemented();
-}
-
-QString KHTMLPart::referrer() const
-{
- _logNeverImplemented();
- return QString();
-}
-
-QString KHTMLPart::lastModified() const
-{
- _logNeverImplemented();
- return QString();
-}
-
-QString KHTMLPart::jsStatusBarText() const
-{
- _logNeverImplemented();
- return QString();
-}
-
-QString KHTMLPart::jsDefaultStatusBarText() const
-{
- _logNeverImplemented();
- return QString();
-}
-
QPtrList<KParts::ReadOnlyPart> KHTMLPart::frames() const
-
{
_logNeverImplemented();
return QPtrList<KParts::ReadOnlyPart>();
@@ -1556,46 +1025,6 @@ void KHTMLPart::khtmlDrawContentsEvent( khtml::DrawContentsEvent * )
{
}
-void KHTMLPart::selectAll()
-{
-// DUBIOUS, perhaps selection should be managed externally
- _logNeverImplemented();
-}
-
-DOM::EventListener *KHTMLPart::createHTMLEventListener( QString code )
-{
- KJSProxy *proxy = jScript();
-
- if (!proxy)
- return 0;
-
- //fprintf (stdout, "Creating event listener w/ code %s\n", code.latin1());
-
- return proxy->createHTMLEventHandler( d->m_url.url(), code );
-}
-
-KHTMLPart *KHTMLPart::opener()
-{
- _logNeverImplemented();
- return 0L;
-}
-
-void KHTMLPart::setOpener(KHTMLPart *_opener)
-{
- _logNeverImplemented();
-}
-
-bool KHTMLPart::openedByJS()
-{
- _logNeverImplemented();
- return FALSE;
-}
-
-void KHTMLPart::setOpenedByJS(bool _openedByJS)
-{
- _logNeverImplemented();
-}
-
QString KHTMLPart::documentSource() const
{
return d->m_documentSource;
@@ -1613,14 +1042,6 @@ void KHTMLPart::setBaseURL(const KURL &url)
}
}
-KURL KHTMLPart::baseURL() const
-{
- if (d->m_baseURL.isEmpty()) {
- return d->m_workingURL;
- }
- return d->m_baseURL;
-}
-
void KHTMLPart::setView(KHTMLView *view)
{
d->m_view = view;
@@ -1631,31 +1052,11 @@ void KHTMLPart::nodeActivated(const DOM::Node &aNode)
KWQDEBUG ("name %s = %s\n", (const char *)aNode.nodeName().string(), (const char *)aNode.nodeValue().string());
}
-void KHTMLPart::stopAutoScroll()
-{
- _logNeverImplemented();
-}
-
void KHTMLPart::setTitle(const DOMString &title)
{
[getDataSource() _setTitle:(NSString *)title.string().getCFMutableString()];
}
-QString KHTMLPart::sheetUsed() const
-{
- return d->m_sheetUsed;
-}
-
-void KHTMLPart::setSheetUsed(const QString &qs)
-{
- d->m_sheetUsed = qs;
-}
-
-int KHTMLPart::zoomFactor(void) const
-{
- return 100;
-}
-
void KHTMLPart::setDataSource(IFWebDataSource *dataSource)
{
d->m_dataSource = dataSource; // not retained
@@ -1663,5 +1064,5 @@ void KHTMLPart::setDataSource(IFWebDataSource *dataSource)
IFWebDataSource *KHTMLPart::getDataSource()
{
- return d->m_dataSource;
+ return (IFWebDataSource *)d->m_dataSource;
}
diff --git a/WebCore/kwq/KWQKHTMLSettings.h b/WebCore/kwq/KWQKHTMLSettings.h
index 81a6ad4..6932eae 100644
--- a/WebCore/kwq/KWQKHTMLSettings.h
+++ b/WebCore/kwq/KWQKHTMLSettings.h
@@ -34,7 +34,15 @@
class KHTMLSettings
{
public:
+ enum KAnimationAdvice {
+ KAnimationDisabled,
+ KAnimationLoopOnce,
+ KAnimationEnabled
+ };
+
KHTMLSettings();
+
+ void init() { }
// Font settings
QString stdFontName() const;
@@ -43,6 +51,9 @@ public:
QString sansSerifFontName() const;
QString cursiveFontName() const;
QString fantasyFontName() const;
+
+ void setStdFontName(const QString &) { }
+ void setFixedFontName(const QString &) { }
QString settingsToCSS() const;
@@ -59,6 +70,19 @@ public:
bool isFormCompletionEnabled() const;
int maxFormCompletionItems() const;
+ bool autoLoadImages() const;
+ KAnimationAdvice showAnimations() const;
+
+ bool isJavaScriptEnabled() const;
+ bool isJavaScriptEnabled(const QString &host) const;
+ bool isJavaScriptDebugEnabled() const;
+ bool isJavaEnabled() const;
+ bool isJavaEnabled(const QString &host) const;
+ bool isPluginsEnabled() const;
+ bool isPluginsEnabled(const QString &host) const;
+
+ QString userStyleSheet() const;
+
private:
QFont::CharSet m_charSet;
};
diff --git a/WebCore/kwq/KWQKHTMLSettings.mm b/WebCore/kwq/KWQKHTMLSettings.mm
index 3ef2d3b..50f973b 100644
--- a/WebCore/kwq/KWQKHTMLSettings.mm
+++ b/WebCore/kwq/KWQKHTMLSettings.mm
@@ -120,3 +120,44 @@ int KHTMLSettings::maxFormCompletionItems() const
_logNotYetImplemented();
return 0;
}
+
+bool KHTMLSettings::isJavaEnabled(QString const&) const
+{
+ return isJavaEnabled();
+}
+
+bool KHTMLSettings::isJavaEnabled() const
+{
+ return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitJavaEnabled"] boolValue];
+}
+
+bool KHTMLSettings::autoLoadImages() const
+{
+ _logNotYetImplemented();
+ return true;
+}
+
+bool KHTMLSettings::isPluginsEnabled(QString const&) const
+{
+ return isPluginsEnabled();
+}
+
+bool KHTMLSettings::isPluginsEnabled() const
+{
+ return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitPluginsEnabled"] boolValue];
+}
+
+bool KHTMLSettings::isJavaScriptEnabled(QString const&) const
+{
+ return isJavaScriptEnabled();
+}
+
+bool KHTMLSettings::isJavaScriptEnabled() const
+{
+ return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitJScriptEnabled"] boolValue];
+}
+
+bool KHTMLSettings::isJavaScriptDebugEnabled() const
+{
+ return false;
+}
diff --git a/WebCore/kwq/KWQKInstance.h b/WebCore/kwq/KWQKInstance.h
index abffcfd..9cd1360 100644
--- a/WebCore/kwq/KWQKInstance.h
+++ b/WebCore/kwq/KWQKInstance.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,49 +26,6 @@
#ifndef KINSTANCE_H_
#define KINSTANCE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qcstring.h>
-
-class KIconLoader;
-
-// class KInstance =============================================================
-
-class KInstance {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- KInstance(const QCString &);
- virtual ~KInstance();
-
- // member functions --------------------------------------------------------
-
- KIconLoader *iconLoader() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying
- // note that this is "standard" (no pendantic stuff needed)
- KInstance(const KInstance &);
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KInstance &operator=(const KInstance &);
-#endif
-
-}; // class KInstance ==========================================================
+class KInstance { };
#endif
diff --git a/WebCore/kwq/KWQKInstance.mm b/WebCore/kwq/KWQKInstance.mm
index d19e72b..e69de29 100644
--- a/WebCore/kwq/KWQKInstance.mm
+++ b/WebCore/kwq/KWQKInstance.mm
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. 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 <kwqdebug.h>
-#include <kinstance.h>
-
-KInstance::KInstance(const QCString &)
-{
- _logNotYetImplemented();
-}
-
-
-KInstance::~KInstance()
-{
- _logNotYetImplemented();
-}
-
-
-KIconLoader *KInstance::iconLoader() const
-{
- _logNotYetImplemented();
- return 0L;
-}
-
-
diff --git a/WebCore/kwq/KWQKKAction.h b/WebCore/kwq/KWQKKAction.h
index 6013da5..c2d4145 100644
--- a/WebCore/kwq/KWQKKAction.h
+++ b/WebCore/kwq/KWQKKAction.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,49 +26,7 @@
#ifndef KACTION_H_
#define KACTION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qpopupmenu.h>
-
-// class KAction ===============================================================
-
-class KAction {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KAction();
- virtual ~KAction();
-
- void slotActivated();
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KAction(const KAction &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KAction &operator=(const KAction &);
-#endif
-
-}; // class KAction ============================================================
+class KAction { };
+class KSelectAction { };
#endif
diff --git a/WebCore/kwq/KWQGlobal.mm b/WebCore/kwq/KWQKLibrary.h
similarity index 90%
copy from WebCore/kwq/KWQGlobal.mm
copy to WebCore/kwq/KWQKLibrary.h
index 013222c..e697dbd 100644
--- a/WebCore/kwq/KWQGlobal.mm
+++ b/WebCore/kwq/KWQKLibrary.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,11 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-void qDebug(const char *msg, ...)
+class KLibrary
{
-}
-
-void qWarning(const char *msg, ...)
-{
-}
-
+public:
+ void unload() { }
+};
diff --git a/WebCore/kwq/KWQKPartsBrowserExtension.h b/WebCore/kwq/KWQKPartsBrowserExtension.h
index 85667e4..b3fc7ab 100644
--- a/WebCore/kwq/KWQKPartsBrowserExtension.h
+++ b/WebCore/kwq/KWQKPartsBrowserExtension.h
@@ -26,10 +26,6 @@
#ifndef BROWSEREXTENSION_H_
#define BROWSEREXTENSION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qpoint.h>
#include <qevent.h>
#include <KWQDataStream.h>
@@ -39,49 +35,10 @@
#include "part.h"
#include "browserinterface.h"
-// class KXMLGUIClient =========================================================
-
-class KXMLGUIClient {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KXMLGUIClient();
- ~KXMLGUIClient();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KXMLGUIClient(const KXMLGUIClient &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KXMLGUIClient &operator=(const KXMLGUIClient &);
-#endif
-
-}; // class KXMLGUIClient ======================================================
-
+class KXMLGUIClient { };
namespace KParts {
-// struct URLArgs ==============================================================
-
struct URLArgs {
QString frameName;
@@ -89,15 +46,9 @@ struct URLArgs {
int xOffset;
int yOffset;
- URLArgs();
- URLArgs( const URLArgs &);
- URLArgs &operator=(const URLArgs &);
- virtual ~URLArgs();
+ URLArgs() : xOffset(0), yOffset(0) { }
-}; // struct URLArgs ===========================================================
-
-
-// struct WindowArgs ===========================================================
+};
struct WindowArgs {
@@ -111,109 +62,33 @@ struct WindowArgs {
bool resizable;
bool fullscreen;
- WindowArgs();
- WindowArgs(const WindowArgs &);
- WindowArgs &operator=(const WindowArgs &);
-
-}; // struct WindowArgs ========================================================
+ WindowArgs() : x(0), y(0), width(0), height(0), menuBarVisible(false), statusBarVisible(false), toolBarsVisible(false), resizable(false), fullscreen(false) { }
-
-// class BrowserExtension ======================================================
+};
class BrowserExtension : public QObject {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- BrowserExtension() {}
-#endif
-
- virtual ~BrowserExtension();
-
- // member functions --------------------------------------------------------
-
- BrowserInterface *browserInterface() const;
+ BrowserInterface *browserInterface() const { return 0; }
- void openURLRequest(const KURL &,
- const KParts::URLArgs &args=KParts::URLArgs());
-
- void createNewWindow(const KURL &);
+ void openURLRequest(const KURL &) { }
+ void openURLRequest(const KURL &, const KParts::URLArgs &args) { }
+ void createNewWindow(const KURL &) { }
+ void createNewWindow(const KURL &, const KParts::URLArgs &) { }
void createNewWindow(const KURL &, const KParts::URLArgs &,
- const KParts::WindowArgs &, KParts::ReadOnlyPart *&);
-
- void setIconURL(const KURL &);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- BrowserExtension(const BrowserExtension &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- BrowserExtension &operator=(const BrowserExtension &);
-#endif
-
-}; // class BrowserExtension ===================================================
+ const KParts::WindowArgs &, KParts::ReadOnlyPart *&) { }
-
-// class BrowserHostExtension ==================================================
-
-class BrowserHostExtension : public QObject {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- BrowserHostExtension();
- virtual ~BrowserHostExtension();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
+ void setIconURL(const KURL &) { }
+
+ void setURLArgs(const KParts::URLArgs &args) { m_args = args; }
+ KParts::URLArgs urlArgs() const { return m_args; }
private:
+ KParts::URLArgs m_args;
+};
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- BrowserHostExtension(const BrowserHostExtension &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- BrowserHostExtension &operator=(const BrowserHostExtension &);
-#endif
-
-}; // class BrowserHostExtension ===============================================
+class BrowserHostExtension : public QObject { };
} // namespace KParts
#endif
-
-
diff --git a/WebCore/kwq/KWQKPartsPart.h b/WebCore/kwq/KWQKPartsPart.h
index 68f142f..2ec0a32 100644
--- a/WebCore/kwq/KWQKPartsPart.h
+++ b/WebCore/kwq/KWQKPartsPart.h
@@ -26,10 +26,7 @@
#ifndef PART_H_
#define PART_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
+#include <kinstance.h>
#include <kurl.h>
#include <qobject.h>
#include <qvariant.h>
@@ -37,146 +34,37 @@
#include <qstringlist.h>
#include <qvaluelist.h>
-namespace KIO {
-class Job;
-} // namespace KIO
-
class QWidget;
-class QCursor;
-class QDataStream;
-class QPainter;
-namespace KParts {
+namespace KIO {
+ class Job;
+}
-// class Part ==================================================================
+namespace KParts {
class Part : public QObject {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- Part();
- virtual ~Part();
-
- // member functions --------------------------------------------------------
-
- QWidget *widget();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
+ Part() : m_widget(0) { }
+ QWidget *widget() const { return m_widget; }
+ void setWidget(QWidget *widget) { m_widget = widget; }
private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- Part(const Part &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- Part &operator=(const Part &);
-#endif
-
-}; // class Part ===============================================================
-
-
-// class ReadOnlyPart ==========================================================
+ QWidget *m_widget;
+};
class ReadOnlyPart : public Part {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
+ ReadOnlyPart(QObject * = 0, const char * = 0) { }
- // constructors, copy constructors, and destructors ------------------------
-
- ReadOnlyPart();
- virtual ~ReadOnlyPart();
-
- // member functions --------------------------------------------------------
-
- virtual const KURL &url() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- ReadOnlyPart(const ReadOnlyPart &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- ReadOnlyPart &operator=(const ReadOnlyPart &);
-#endif
-
-}; // class ReadOnlyPart =======================================================
-
-
-// class GUIActivateEvent ======================================================
-
-class GUIActivateEvent {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
+ KURL url() const { return m_url; }
+ KURL m_url;
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- GUIActivateEvent() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~GUIActivateEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- GUIActivateEvent(const GUIActivateEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- GUIActivateEvent &operator=(const GUIActivateEvent &);
-#endif
-
-}; // class GUIActivateEvent ===================================================
+ void setXMLFile(const char *) { }
+ QObject *parent() const { return 0; }
+ void setInstance(KInstance *, bool) { }
+ void setStatusBarText(const QString &) { }
+};
+class GUIActivateEvent { };
} // namespace KParts
diff --git a/WebCore/kwq/KWQGuardedPtr.mm b/WebCore/kwq/KWQKPartsPartManager.h
similarity index 90%
copy from WebCore/kwq/KWQGuardedPtr.mm
copy to WebCore/kwq/KWQKPartsPartManager.h
index 98d1e16..5380961 100644
--- a/WebCore/kwq/KWQGuardedPtr.mm
+++ b/WebCore/kwq/KWQKPartsPartManager.h
@@ -23,11 +23,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef KPARTS_PARTMANAGER_H
+#define KPARTS_PARTMANAGER_H
+
#include <qguardedptr.h>
+#include <qtimer.h>
+
+namespace KParts {
+
+class PartManager;
-KWQGuardedPtrBase::KWQGuardedPtrBase(QObject *o)
-{
- if (o) {
- iterator = QPtrListIterator<QObject>(o->guardedPtrDummyList);
- }
}
+
+class DCOPObject { };
+
+#endif
diff --git a/WebCore/kwq/KWQKURL.h b/WebCore/kwq/KWQKURL.h
index a6921b9..651847c 100644
--- a/WebCore/kwq/KWQKURL.h
+++ b/WebCore/kwq/KWQKURL.h
@@ -74,6 +74,8 @@ public:
QString ref() const;
QString query() const;
QString path() const;
+ QString htmlRef() const;
+ QString encodedHtmlRef() const;
void setProtocol(const QString &);
void setHost(const QString &);
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index 75df6b2..e78150a 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -743,3 +743,15 @@ NSURL *KURL::getNSURL() const
parse();
return [[(NSURL *)d->urlRef retain] autorelease];
}
+
+QString KURL::encodedHtmlRef() const
+{
+ _logNotYetImplemented();
+ return 0;
+}
+
+QString KURL::htmlRef() const
+{
+ _logNotYetImplemented();
+ return 0;
+}
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index be1a00a..e8a0a1f 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -1425,8 +1425,12 @@ void Cache::init()
nullPixmap = new QPixmap;
if ( !brokenPixmap )
+#ifdef APPLE_CHANGES
+ brokenPixmap = new QPixmap;
+#else
// brokenPixmap = new QPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::FileSystem, 16, KIcon::DisabledState));
brokenPixmap = new QPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState));
+#endif
if ( !m_loader )
m_loader = new Loader();
@@ -1811,6 +1815,14 @@ void Cache::setCacheDisabled(bool disabled)
flushAll();
}
+void Cache::preloadScript(const QString &, const QString &)
+{
+}
+
+void Cache::preloadStyleSheet(const QString &, const QString &)
+{
+}
+
#endif
#include "loader.moc"
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index be1a00a..e8a0a1f 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -1425,8 +1425,12 @@ void Cache::init()
nullPixmap = new QPixmap;
if ( !brokenPixmap )
+#ifdef APPLE_CHANGES
+ brokenPixmap = new QPixmap;
+#else
// brokenPixmap = new QPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::FileSystem, 16, KIcon::DisabledState));
brokenPixmap = new QPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState));
+#endif
if ( !m_loader )
m_loader = new Loader();
@@ -1811,6 +1815,14 @@ void Cache::setCacheDisabled(bool disabled)
flushAll();
}
+void Cache::preloadScript(const QString &, const QString &)
+{
+}
+
+void Cache::preloadStyleSheet(const QString &, const QString &)
+{
+}
+
#endif
#include "loader.moc"
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index be1a00a..e8a0a1f 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -1425,8 +1425,12 @@ void Cache::init()
nullPixmap = new QPixmap;
if ( !brokenPixmap )
+#ifdef APPLE_CHANGES
+ brokenPixmap = new QPixmap;
+#else
// brokenPixmap = new QPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::FileSystem, 16, KIcon::DisabledState));
brokenPixmap = new QPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState));
+#endif
if ( !m_loader )
m_loader = new Loader();
@@ -1811,6 +1815,14 @@ void Cache::setCacheDisabled(bool disabled)
flushAll();
}
+void Cache::preloadScript(const QString &, const QString &)
+{
+}
+
+void Cache::preloadStyleSheet(const QString &, const QString &)
+{
+}
+
#endif
#include "loader.moc"
diff --git a/WebCore/kwq/KWQPart.mm b/WebCore/kwq/KWQPart.mm
index ac316b1..e69de29 100644
--- a/WebCore/kwq/KWQPart.mm
+++ b/WebCore/kwq/KWQPart.mm
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. 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 <qwidget.h>
-#include <kwqdebug.h>
-#include <part.h>
-
-
-// class Part ==================================================================
-
-KParts::Part::Part()
-{
- _logNotYetImplemented();
-}
-
-
-KParts::Part::~Part()
-{
- _logNotYetImplemented();
-}
-
-
-static QWidget *theWidget = NULL;
-QWidget *KParts::Part::widget()
-{
- _logNotYetImplemented();
-
- if (theWidget == NULL) {
- theWidget = new QWidget();
- }
-
- return theWidget;
-}
-
-
-// class ReadOnlyPart ==================================================================
-
-KParts::ReadOnlyPart::ReadOnlyPart()
-{
- _logNotYetImplemented();
-}
-
-
-KParts::ReadOnlyPart::~ReadOnlyPart()
-{
- _logNotYetImplemented();
-}
-
-
-static KURL *emptyURL = NULL;
-const KURL &KParts::ReadOnlyPart::url() const
-{
- // must override
- _logNeverImplemented();
-
- if (emptyURL == NULL) {
- emptyURL = new KURL();
- }
-
- return *emptyURL;
-}
diff --git a/WebCore/kwq/KWQScrollView.h b/WebCore/kwq/KWQScrollView.h
index 53902d3..e6f9c09 100644
--- a/WebCore/kwq/KWQScrollView.h
+++ b/WebCore/kwq/KWQScrollView.h
@@ -80,6 +80,7 @@ public:
void updateContents(const QRect &r);
void repaintContents(int x, int y, int w, int h, bool erase=TRUE);
QPoint contentsToViewport(const QPoint &);
+ void contentsToViewport(int x, int y, int& vx, int& vy);
void viewportToContents(int vx, int vy, int& x, int& y);
virtual void viewportWheelEvent(QWheelEvent *);
diff --git a/WebCore/kwq/KWQTimer.h b/WebCore/kwq/KWQTimer.h
index 3a1050d..34be38c 100644
--- a/WebCore/kwq/KWQTimer.h
+++ b/WebCore/kwq/KWQTimer.h
@@ -26,42 +26,15 @@
#ifndef QTIMER_H_
#define QTIMER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qobject.h"
-
-// class QTimer ================================================================
+#include <qobject.h>
class QTimer : public QObject {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static void singleShot(int, QObject *, const char *);
-
- // constructors, copy constructors, and destructors ------------------------
- QTimer();
- ~QTimer();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QTimer(const QTimer &);
- QTimer &operator=(const QTimer &);
-
-}; // class QTimer =============================================================
+ bool isActive() const;
+ void start(int msec, bool singleShot = false);
+ void stop();
+};
#endif
diff --git a/WebCore/kwq/KWQTimer.mm b/WebCore/kwq/KWQTimer.mm
index 28b7d17..5f8e9f6 100644
--- a/WebCore/kwq/KWQTimer.mm
+++ b/WebCore/kwq/KWQTimer.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,13 +23,27 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
-
#include <qtimer.h>
+#include <kwqdebug.h>
+
void QTimer::singleShot(int, QObject *, const char *)
{
_logNotYetImplemented();
}
+bool QTimer::isActive() const
+{
+ _logNotYetImplemented();
+ return false;
+}
+
+void QTimer::start(int msec, bool singleShot)
+{
+ _logNotYetImplemented();
+}
+void QTimer::stop()
+{
+ _logNotYetImplemented();
+}
diff --git a/WebCore/kwq/KWQbrowserextension.mm b/WebCore/kwq/KWQbrowserextension.mm
index 40deaa7..e69de29 100644
--- a/WebCore/kwq/KWQbrowserextension.mm
+++ b/WebCore/kwq/KWQbrowserextension.mm
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. 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 <kwqdebug.h>
-
-#include <browserextension.h>
-
-namespace KParts {
-
-// class BrowserExtension ======================================================
-
-BrowserExtension::~BrowserExtension()
-{
- _logNotYetImplemented();
-}
-
-static BrowserInterface *tempBrowserInterface = 0;
-
-BrowserInterface *BrowserExtension::browserInterface() const
-{
- _logNotYetImplemented();
- return tempBrowserInterface;
-}
-
-
-void BrowserExtension::createNewWindow(const KURL &)
-{
- _logNotYetImplemented();
-}
-
-void BrowserExtension::createNewWindow(const KURL &, const KParts::URLArgs &,
- const KParts::WindowArgs &, KParts::ReadOnlyPart *&)
-{
- _logNotYetImplemented();
-}
-
-void BrowserExtension::openURLRequest(const KURL &, const KParts::URLArgs &)
-{
- _logNotYetImplemented();
-}
-
-void BrowserExtension::setIconURL(const KURL &)
-{
- _logNotYetImplemented();
-}
-
-// class BrowserHostExtension ==================================================
-
-BrowserHostExtension::BrowserHostExtension()
-{
- _logNotYetImplemented();
-}
-
-
-BrowserHostExtension::~BrowserHostExtension()
-{
- _logNotYetImplemented();
-}
-
-
-// struct URLArgs ==============================================================
-
-URLArgs::URLArgs()
-{
- _logNotYetImplemented();
-}
-
-URLArgs::URLArgs( const URLArgs &)
-{
- _logNotYetImplemented();
-}
-
-URLArgs::~URLArgs()
-{
- _logNotYetImplemented();
-}
-
-// struct WindowArgs ===========================================================
-
-WindowArgs::WindowArgs()
-{
- _logNotYetImplemented();
-}
-
-WindowArgs::WindowArgs(const WindowArgs &)
-{
- _logNotYetImplemented();
-}
-
-
-} // namespace KParts
-
-
-
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/dcop/kdatastream.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/dcop/kdatastream.h
diff --git a/WebCore/kwq/kdecore/kinstance.h b/WebCore/kwq/kdecore/kinstance.h
index abffcfd..9cd1360 100644
--- a/WebCore/kwq/kdecore/kinstance.h
+++ b/WebCore/kwq/kdecore/kinstance.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,49 +26,6 @@
#ifndef KINSTANCE_H_
#define KINSTANCE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qcstring.h>
-
-class KIconLoader;
-
-// class KInstance =============================================================
-
-class KInstance {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- KInstance(const QCString &);
- virtual ~KInstance();
-
- // member functions --------------------------------------------------------
-
- KIconLoader *iconLoader() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying
- // note that this is "standard" (no pendantic stuff needed)
- KInstance(const KInstance &);
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KInstance &operator=(const KInstance &);
-#endif
-
-}; // class KInstance ==========================================================
+class KInstance { };
#endif
diff --git a/WebCore/kwq/KWQGlobal.mm b/WebCore/kwq/kdecore/klibloader.h
similarity index 90%
copy from WebCore/kwq/KWQGlobal.mm
copy to WebCore/kwq/kdecore/klibloader.h
index 013222c..e697dbd 100644
--- a/WebCore/kwq/KWQGlobal.mm
+++ b/WebCore/kwq/kdecore/klibloader.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,11 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-void qDebug(const char *msg, ...)
+class KLibrary
{
-}
-
-void qWarning(const char *msg, ...)
-{
-}
-
+public:
+ void unload() { }
+};
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/kdecore/kmultipledrag.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/kdecore/kmultipledrag.h
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/kdecore/ktempfile.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/kdecore/ktempfile.h
diff --git a/WebCore/kwq/kdecore/kurl.h b/WebCore/kwq/kdecore/kurl.h
index a6921b9..651847c 100644
--- a/WebCore/kwq/kdecore/kurl.h
+++ b/WebCore/kwq/kdecore/kurl.h
@@ -74,6 +74,8 @@ public:
QString ref() const;
QString query() const;
QString path() const;
+ QString htmlRef() const;
+ QString encodedHtmlRef() const;
void setProtocol(const QString &);
void setHost(const QString &);
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/kdecore/kurldrag.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/kdecore/kurldrag.h
diff --git a/WebCore/kwq/kdeui/kaction.h b/WebCore/kwq/kdeui/kaction.h
index 6013da5..c2d4145 100644
--- a/WebCore/kwq/kdeui/kaction.h
+++ b/WebCore/kwq/kdeui/kaction.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,49 +26,7 @@
#ifndef KACTION_H_
#define KACTION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qpopupmenu.h>
-
-// class KAction ===============================================================
-
-class KAction {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KAction();
- virtual ~KAction();
-
- void slotActivated();
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KAction(const KAction &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KAction &operator=(const KAction &);
-#endif
-
-}; // class KAction ============================================================
+class KAction { };
+class KSelectAction { };
#endif
diff --git a/WebCore/kwq/kdeui/kcursor.h b/WebCore/kwq/kdeui/kcursor.h
index b4d536b..f81abfd 100644
--- a/WebCore/kwq/kdeui/kcursor.h
+++ b/WebCore/kwq/kdeui/kcursor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,31 +26,16 @@
#ifndef KCURSOR_H_
#define KCURSOR_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qwidget.h>
-
-static const QCursor &arrowCursor = QCursor();
-static const QCursor &waitCursor = QCursor();
-
-// class KCursor ===============================================================
+#include <qcursor.h>
class KCursor {
public:
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static void setAutoHideCursor(QWidget *w, bool enable);
static QCursor arrowCursor();
static QCursor crossCursor();
+ static QCursor handCursor();
static QCursor sizeAllCursor();
static QCursor sizeHorCursor();
static QCursor sizeVerCursor();
@@ -60,35 +45,8 @@ public:
static QCursor waitCursor();
static QCursor whatsThisCursor();
- // constructors, copy constructors, and destructors ------------------------
-
- KCursor();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KCursor() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCursor(const KCursor &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCursor &operator=(const KCursor &);
-#endif
+};
-}; // class KCursor ============================================================
+extern const QCursor &waitCursor;
#endif
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/kdeui/kstdaction.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/kdeui/kstdaction.h
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/kdeui/kxmlguifactory.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/kdeui/kxmlguifactory.h
diff --git a/WebCore/kwq/WebCoreTextRendererFactory.h b/WebCore/kwq/khtml/khtml_ext.h
similarity index 75%
copy from WebCore/kwq/WebCoreTextRendererFactory.h
copy to WebCore/kwq/khtml/khtml_ext.h
index bf703f1..c9c30f0 100644
--- a/WebCore/kwq/WebCoreTextRendererFactory.h
+++ b/WebCore/kwq/khtml/khtml_ext.h
@@ -23,16 +23,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <Cocoa/Cocoa.h>
+#include <kparts/browserextension.h>
- at protocol WebCoreTextRenderer;
+class QWidget;
- at interface WebCoreTextRendererFactory : NSObject
-{
-}
+class KHTMLPartBrowserExtension : public KParts::BrowserExtension {
+public:
+ KHTMLPartBrowserExtension(KHTMLPart *) { }
+ void editableWidgetFocused(QWidget *) { }
+ void editableWidgetBlurred(QWidget *) { }
+ void setLocationBarURL(const QString &) { }
+};
-+ (WebCoreTextRendererFactory *)sharedFactory;
-- init;
-- (id <WebCoreTextRenderer>)rendererWithFamily:(NSString *)family traits:(NSFontTraitMask)traits size:(float)size;
+class KHTMLPartBrowserHostExtension {
+public:
+ KHTMLPartBrowserHostExtension(KHTMLPart *) { }
+};
- at end
+class KHTMLZoomFactorAction { };
diff --git a/WebCore/kwq/khtml/khtml_factory.h b/WebCore/kwq/khtml/khtml_factory.h
index 04ca795..b955144 100644
--- a/WebCore/kwq/khtml/khtml_factory.h
+++ b/WebCore/kwq/khtml/khtml_factory.h
@@ -1,42 +1,42 @@
-/* This file is part of the KDE project
+/*
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
+ * 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 library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * 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.
*/
+
#ifndef __khtml_factory_h__
#define __khtml_factory_h__
+#include <khtml_part.h>
#include <kparts/factory.h>
#include <kparts/historyprovider.h>
-#include <qlist.h>
class KInstance;
-class HistoryProvider;
class KHTMLPart;
class KHTMLSettings;
-class KHTMLFactory : public KParts::Factory
+class KHTMLFactory
{
public:
- KHTMLFactory( bool clone = false );
- virtual ~KHTMLFactory();
-
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &args );
-
static KInstance *instance();
static KHTMLSettings *defaultHTMLSettings();
@@ -45,9 +45,9 @@ public:
static KParts::HistoryProvider *vLinks() {
return KParts::HistoryProvider::self();
}
-
-private:
- static QPtrList<KHTMLPart> *s_parts;
+
+ static void registerPart(KHTMLPart *) { }
+ static void deregisterPart(KHTMLPart *) { }
};
#endif
diff --git a/WebCore/kwq/KWQGlobal.mm b/WebCore/kwq/khtml/khtml_find.h
similarity index 90%
copy from WebCore/kwq/KWQGlobal.mm
copy to WebCore/kwq/khtml/khtml_find.h
index 013222c..a90715c 100644
--- a/WebCore/kwq/KWQGlobal.mm
+++ b/WebCore/kwq/khtml/khtml_find.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,11 +23,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-void qDebug(const char *msg, ...)
-{
-}
-
-void qWarning(const char *msg, ...)
-{
-}
-
+class KHTMLFind;
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/khtml/khtml_iface.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/khtml/khtml_iface.h
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/khtml/khtml_pagecache.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/khtml/khtml_pagecache.h
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/khtml/khtml_run.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/khtml/khtml_run.h
diff --git a/WebCore/kwq/khtml/khtml_settings.h b/WebCore/kwq/khtml/khtml_settings.h
index 81a6ad4..6932eae 100644
--- a/WebCore/kwq/khtml/khtml_settings.h
+++ b/WebCore/kwq/khtml/khtml_settings.h
@@ -34,7 +34,15 @@
class KHTMLSettings
{
public:
+ enum KAnimationAdvice {
+ KAnimationDisabled,
+ KAnimationLoopOnce,
+ KAnimationEnabled
+ };
+
KHTMLSettings();
+
+ void init() { }
// Font settings
QString stdFontName() const;
@@ -43,6 +51,9 @@ public:
QString sansSerifFontName() const;
QString cursiveFontName() const;
QString fantasyFontName() const;
+
+ void setStdFontName(const QString &) { }
+ void setFixedFontName(const QString &) { }
QString settingsToCSS() const;
@@ -59,6 +70,19 @@ public:
bool isFormCompletionEnabled() const;
int maxFormCompletionItems() const;
+ bool autoLoadImages() const;
+ KAnimationAdvice showAnimations() const;
+
+ bool isJavaScriptEnabled() const;
+ bool isJavaScriptEnabled(const QString &host) const;
+ bool isJavaScriptDebugEnabled() const;
+ bool isJavaEnabled() const;
+ bool isJavaEnabled(const QString &host) const;
+ bool isPluginsEnabled() const;
+ bool isPluginsEnabled(const QString &host) const;
+
+ QString userStyleSheet() const;
+
private:
QFont::CharSet m_charSet;
};
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/kio/kssl/ksslcertchain.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/kio/kssl/ksslcertchain.h
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/kio/kssl/ksslinfodlg.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/kio/kssl/ksslinfodlg.h
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/kio/ktrader.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/kio/ktrader.h
diff --git a/WebCore/kwq/kparts/browserextension.h b/WebCore/kwq/kparts/browserextension.h
index 85667e4..b3fc7ab 100644
--- a/WebCore/kwq/kparts/browserextension.h
+++ b/WebCore/kwq/kparts/browserextension.h
@@ -26,10 +26,6 @@
#ifndef BROWSEREXTENSION_H_
#define BROWSEREXTENSION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qpoint.h>
#include <qevent.h>
#include <KWQDataStream.h>
@@ -39,49 +35,10 @@
#include "part.h"
#include "browserinterface.h"
-// class KXMLGUIClient =========================================================
-
-class KXMLGUIClient {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KXMLGUIClient();
- ~KXMLGUIClient();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KXMLGUIClient(const KXMLGUIClient &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KXMLGUIClient &operator=(const KXMLGUIClient &);
-#endif
-
-}; // class KXMLGUIClient ======================================================
-
+class KXMLGUIClient { };
namespace KParts {
-// struct URLArgs ==============================================================
-
struct URLArgs {
QString frameName;
@@ -89,15 +46,9 @@ struct URLArgs {
int xOffset;
int yOffset;
- URLArgs();
- URLArgs( const URLArgs &);
- URLArgs &operator=(const URLArgs &);
- virtual ~URLArgs();
+ URLArgs() : xOffset(0), yOffset(0) { }
-}; // struct URLArgs ===========================================================
-
-
-// struct WindowArgs ===========================================================
+};
struct WindowArgs {
@@ -111,109 +62,33 @@ struct WindowArgs {
bool resizable;
bool fullscreen;
- WindowArgs();
- WindowArgs(const WindowArgs &);
- WindowArgs &operator=(const WindowArgs &);
-
-}; // struct WindowArgs ========================================================
+ WindowArgs() : x(0), y(0), width(0), height(0), menuBarVisible(false), statusBarVisible(false), toolBarsVisible(false), resizable(false), fullscreen(false) { }
-
-// class BrowserExtension ======================================================
+};
class BrowserExtension : public QObject {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- BrowserExtension() {}
-#endif
-
- virtual ~BrowserExtension();
-
- // member functions --------------------------------------------------------
-
- BrowserInterface *browserInterface() const;
+ BrowserInterface *browserInterface() const { return 0; }
- void openURLRequest(const KURL &,
- const KParts::URLArgs &args=KParts::URLArgs());
-
- void createNewWindow(const KURL &);
+ void openURLRequest(const KURL &) { }
+ void openURLRequest(const KURL &, const KParts::URLArgs &args) { }
+ void createNewWindow(const KURL &) { }
+ void createNewWindow(const KURL &, const KParts::URLArgs &) { }
void createNewWindow(const KURL &, const KParts::URLArgs &,
- const KParts::WindowArgs &, KParts::ReadOnlyPart *&);
-
- void setIconURL(const KURL &);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- BrowserExtension(const BrowserExtension &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- BrowserExtension &operator=(const BrowserExtension &);
-#endif
-
-}; // class BrowserExtension ===================================================
+ const KParts::WindowArgs &, KParts::ReadOnlyPart *&) { }
-
-// class BrowserHostExtension ==================================================
-
-class BrowserHostExtension : public QObject {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- BrowserHostExtension();
- virtual ~BrowserHostExtension();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
+ void setIconURL(const KURL &) { }
+
+ void setURLArgs(const KParts::URLArgs &args) { m_args = args; }
+ KParts::URLArgs urlArgs() const { return m_args; }
private:
+ KParts::URLArgs m_args;
+};
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- BrowserHostExtension(const BrowserHostExtension &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- BrowserHostExtension &operator=(const BrowserHostExtension &);
-#endif
-
-}; // class BrowserHostExtension ===============================================
+class BrowserHostExtension : public QObject { };
} // namespace KParts
#endif
-
-
diff --git a/WebCore/kwq/kparts/part.h b/WebCore/kwq/kparts/part.h
index 68f142f..2ec0a32 100644
--- a/WebCore/kwq/kparts/part.h
+++ b/WebCore/kwq/kparts/part.h
@@ -26,10 +26,7 @@
#ifndef PART_H_
#define PART_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
+#include <kinstance.h>
#include <kurl.h>
#include <qobject.h>
#include <qvariant.h>
@@ -37,146 +34,37 @@
#include <qstringlist.h>
#include <qvaluelist.h>
-namespace KIO {
-class Job;
-} // namespace KIO
-
class QWidget;
-class QCursor;
-class QDataStream;
-class QPainter;
-namespace KParts {
+namespace KIO {
+ class Job;
+}
-// class Part ==================================================================
+namespace KParts {
class Part : public QObject {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- Part();
- virtual ~Part();
-
- // member functions --------------------------------------------------------
-
- QWidget *widget();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
+ Part() : m_widget(0) { }
+ QWidget *widget() const { return m_widget; }
+ void setWidget(QWidget *widget) { m_widget = widget; }
private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- Part(const Part &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- Part &operator=(const Part &);
-#endif
-
-}; // class Part ===============================================================
-
-
-// class ReadOnlyPart ==========================================================
+ QWidget *m_widget;
+};
class ReadOnlyPart : public Part {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
+ ReadOnlyPart(QObject * = 0, const char * = 0) { }
- // constructors, copy constructors, and destructors ------------------------
-
- ReadOnlyPart();
- virtual ~ReadOnlyPart();
-
- // member functions --------------------------------------------------------
-
- virtual const KURL &url() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- ReadOnlyPart(const ReadOnlyPart &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- ReadOnlyPart &operator=(const ReadOnlyPart &);
-#endif
-
-}; // class ReadOnlyPart =======================================================
-
-
-// class GUIActivateEvent ======================================================
-
-class GUIActivateEvent {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
+ KURL url() const { return m_url; }
+ KURL m_url;
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- GUIActivateEvent() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~GUIActivateEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- GUIActivateEvent(const GUIActivateEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- GUIActivateEvent &operator=(const GUIActivateEvent &);
-#endif
-
-}; // class GUIActivateEvent ===================================================
+ void setXMLFile(const char *) { }
+ QObject *parent() const { return 0; }
+ void setInstance(KInstance *, bool) { }
+ void setStatusBarText(const QString &) { }
+};
+class GUIActivateEvent { };
} // namespace KParts
diff --git a/WebCore/kwq/KWQGuardedPtr.mm b/WebCore/kwq/kparts/partmanager.h
similarity index 90%
copy from WebCore/kwq/KWQGuardedPtr.mm
copy to WebCore/kwq/kparts/partmanager.h
index 98d1e16..5380961 100644
--- a/WebCore/kwq/KWQGuardedPtr.mm
+++ b/WebCore/kwq/kparts/partmanager.h
@@ -23,11 +23,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef KPARTS_PARTMANAGER_H
+#define KPARTS_PARTMANAGER_H
+
#include <qguardedptr.h>
+#include <qtimer.h>
+
+namespace KParts {
+
+class PartManager;
-KWQGuardedPtrBase::KWQGuardedPtrBase(QObject *o)
-{
- if (o) {
- iterator = QPtrListIterator<QObject>(o->guardedPtrDummyList);
- }
}
+
+class DCOPObject { };
+
+#endif
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/qt/private/qucomextra_p.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/qt/private/qucomextra_p.h
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/qt/qclipboard.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/qt/qclipboard.h
diff --git a/WebCore/kwq/qt/qdatetime.h b/WebCore/kwq/qt/qdatetime.h
index e3917a7..1c352f2 100644
--- a/WebCore/kwq/qt/qdatetime.h
+++ b/WebCore/kwq/qt/qdatetime.h
@@ -26,39 +26,13 @@
#ifndef QDATETIME_H_
#define QDATETIME_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QDATETIME ====================================================
-
-#ifdef USING_BORROWED_QDATETIME
-#include <_qdatetime.h>
-#else
-
#include <iostream>
-// class QTime =================================================================
-
class QTime {
public:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QTime();
QTime(int, int);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QTime() {}
-#endif
-
- // member functions --------------------------------------------------------
-
bool isNull() const;
int hour() const;
int minute() const;
@@ -69,52 +43,22 @@ public:
int restart();
int secsTo( const QTime & ) const;
- // operators ---------------------------------------------------------------
-
- //QTime &operator=(const QTime &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
-
uint getCurrentTime();
void setCurrentTime();
+
uint timeMS; // time is stored in milliseconds
friend class QDateTime;
friend std::ostream &operator<<( std::ostream &, const QTime & );
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QTime(const QTime &);
-#endif
-
-}; // class QTime ==============================================================
-
-
-// class QDate =================================================================
+};
class QDate {
public:
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
QDate();
QDate(int, int, int);
-
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QDate() {}
-#endif
-
- // member functions --------------------------------------------------------
int year() const;
int month() const;
@@ -122,13 +66,6 @@ public:
int daysTo( const QDate & ) const;
- // operators ---------------------------------------------------------------
-
- //QDate &operator=(const QDate &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
protected:
uint greg2jul( int, int, int ) const;
void jul2greg( uint jd, int &y, int &m, int &d ) const;
@@ -141,62 +78,26 @@ private:
friend class QDateTime;
friend std::ostream &operator<<( std::ostream &, const QDate & );
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QDate(const QDate &);
-#endif
-
-}; // class QDate ==============================================================
-
-// class QDateTime =============================================================
+};
class QDateTime {
public:
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
static QDateTime currentDateTime();
- // constructors, copy constructors, and destructors ------------------------
-
QDateTime();
- QDateTime(const QDateTime &);
QDateTime(const QDate &, const QTime &);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QDateTime() {}
-#endif
-
- // member functions --------------------------------------------------------
-
int secsTo(const QDateTime &) const;
QTime time() const;
void setTime_t( uint );
- // operators ---------------------------------------------------------------
-
- // this is not declared in the code, although assignment of this type
- // is used in the code... i guess a pointer copy is what they want
- //
- //QDateTime &operator=(const QDateTime &);
- //
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
QTime timeDT;
QDate dateDT;
-
friend std::ostream &operator<<( std::ostream &, const QDateTime & );
-}; // class QDateTime ==========================================================
-
-#endif // USING_BORROWED_QDATETIME
+};
#endif
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/qt/qmetaobject.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/qt/qmetaobject.h
diff --git a/WebCore/kwq/qt/qscrollview.h b/WebCore/kwq/qt/qscrollview.h
index 53902d3..e6f9c09 100644
--- a/WebCore/kwq/qt/qscrollview.h
+++ b/WebCore/kwq/qt/qscrollview.h
@@ -80,6 +80,7 @@ public:
void updateContents(const QRect &r);
void repaintContents(int x, int y, int w, int h, bool erase=TRUE);
QPoint contentsToViewport(const QPoint &);
+ void contentsToViewport(int x, int y, int& vx, int& vy);
void viewportToContents(int vx, int vy, int& x, int& y);
virtual void viewportWheelEvent(QWheelEvent *);
diff --git a/WebCore/kwq/qt/qtimer.h b/WebCore/kwq/qt/qtimer.h
index 3a1050d..34be38c 100644
--- a/WebCore/kwq/qt/qtimer.h
+++ b/WebCore/kwq/qt/qtimer.h
@@ -26,42 +26,15 @@
#ifndef QTIMER_H_
#define QTIMER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qobject.h"
-
-// class QTimer ================================================================
+#include <qobject.h>
class QTimer : public QObject {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static void singleShot(int, QObject *, const char *);
-
- // constructors, copy constructors, and destructors ------------------------
- QTimer();
- ~QTimer();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QTimer(const QTimer &);
- QTimer &operator=(const QTimer &);
-
-}; // class QTimer =============================================================
+ bool isActive() const;
+ void start(int msec, bool singleShot = false);
+ void stop();
+};
#endif
diff --git a/WebCore/libwebcoretests.exp b/WebCore/libwebcoretests.exp
index e1c8fdf..2458b4a 100644
--- a/WebCore/libwebcoretests.exp
+++ b/WebCore/libwebcoretests.exp
@@ -192,7 +192,6 @@ __ZN8QCStringC1Ev
__ZN8QCStringpLEPKc
__ZN8QCStringpLEc
__ZN9QDateTimeC1ERK5QDateRK5QTime
-__ZN9QDateTimeC1ERKS_
__ZN9QDateTimeC1Ev
__ZNK10KWQMapImpl11endInternalEv
__ZNK10KWQMapImpl12findInternalEP14KWQMapNodeImpl
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list