You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
570 lines
16 KiB
570 lines
16 KiB
12 years ago
|
#ifndef tdehtmlpart_p_h
|
||
|
#define tdehtmlpart_p_h
|
||
15 years ago
|
|
||
|
/* This file is part of the KDE project
|
||
|
*
|
||
|
* Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
|
||
|
* 1999-2001 Lars Knoll <knoll@kde.org>
|
||
|
* 1999-2001 Antti Koivisto <koivisto@kde.org>
|
||
|
* 2000-2001 Simon Hausmann <hausmann@kde.org>
|
||
|
* 2000-2001 Dirk Mueller <mueller@kde.org>
|
||
|
* 2000 Stefan Schimanski <1Stein@gmx.de>
|
||
|
* 2001-2003 George Stiakos <staikos@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., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
#include <kcursor.h>
|
||
|
#include <klibloader.h>
|
||
|
#include <kxmlguifactory.h>
|
||
|
#include <kaction.h>
|
||
12 years ago
|
#include <tdeparts/partmanager.h>
|
||
|
#include <tdeparts/statusbarextension.h>
|
||
|
#include <tdeparts/browserextension.h>
|
||
15 years ago
|
#ifndef KHTML_NO_WALLET
|
||
12 years ago
|
#include <tdewallet.h>
|
||
15 years ago
|
#endif
|
||
|
|
||
14 years ago
|
#include <tqguardedptr.h>
|
||
|
#include <tqmap.h>
|
||
|
#include <tqtimer.h>
|
||
|
#include <tqvaluelist.h>
|
||
15 years ago
|
|
||
|
#include "html/html_formimpl.h"
|
||
12 years ago
|
#include "tdehtml_run.h"
|
||
|
#include "tdehtml_factory.h"
|
||
|
#include "tdehtml_events.h"
|
||
|
#include "tdehtml_ext.h"
|
||
|
#include "tdehtml_iface.h"
|
||
|
#include "tdehtml_settings.h"
|
||
15 years ago
|
#include "misc/decoder.h"
|
||
|
#include "ecma/kjs_proxy.h"
|
||
|
|
||
|
class KFind;
|
||
|
class KFindDialog;
|
||
|
class KPopupMenu;
|
||
|
class KSelectAction;
|
||
|
class KURLLabel;
|
||
|
class KJavaAppletContext;
|
||
|
class KJSErrorDlg;
|
||
|
|
||
12 years ago
|
namespace TDEIO
|
||
15 years ago
|
{
|
||
|
class Job;
|
||
|
class TransferJob;
|
||
|
}
|
||
|
namespace KParts
|
||
|
{
|
||
|
class StatusBarExtension;
|
||
|
}
|
||
|
|
||
12 years ago
|
namespace tdehtml
|
||
15 years ago
|
{
|
||
14 years ago
|
class KDE_EXPORT ChildFrame : public TQObject
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
enum Type { Frame, IFrame, Object };
|
||
|
|
||
12 years ago
|
ChildFrame() : TQObject (0L, "tdehtml_child_frame") {
|
||
15 years ago
|
m_jscript = 0L;
|
||
|
m_kjs_lib = 0;
|
||
|
m_bCompleted = false; m_bPreloaded = false; m_type = Frame; m_bNotify = false;
|
||
|
m_bPendingRedirection = false;
|
||
|
}
|
||
|
|
||
|
~ChildFrame() {
|
||
|
if (m_run) m_run->abort();
|
||
|
delete m_jscript;
|
||
|
if ( m_kjs_lib)
|
||
|
m_kjs_lib->unload();
|
||
|
}
|
||
|
|
||
12 years ago
|
TQGuardedPtr<tdehtml::RenderPart> m_frame;
|
||
14 years ago
|
TQGuardedPtr<KParts::ReadOnlyPart> m_part;
|
||
|
TQGuardedPtr<KParts::BrowserExtension> m_extension;
|
||
|
TQGuardedPtr<KParts::LiveConnectExtension> m_liveconnect;
|
||
|
TQString m_serviceName;
|
||
|
TQString m_serviceType;
|
||
15 years ago
|
KJSProxy *m_jscript;
|
||
|
KLibrary *m_kjs_lib;
|
||
|
bool m_bCompleted;
|
||
14 years ago
|
TQString m_name;
|
||
15 years ago
|
KParts::URLArgs m_args;
|
||
14 years ago
|
TQGuardedPtr<KHTMLRun> m_run;
|
||
15 years ago
|
bool m_bPreloaded;
|
||
|
KURL m_workingURL;
|
||
|
Type m_type;
|
||
14 years ago
|
TQStringList m_params;
|
||
15 years ago
|
bool m_bNotify;
|
||
|
bool m_bPendingRedirection;
|
||
|
protected slots:
|
||
14 years ago
|
void liveConnectEvent(const unsigned long, const TQString&, const KParts::LiveConnectExtension::ArgList&);
|
||
15 years ago
|
};
|
||
|
|
||
|
}
|
||
|
|
||
12 years ago
|
struct KHTMLFrameList : public TQValueList<tdehtml::ChildFrame*>
|
||
15 years ago
|
{
|
||
14 years ago
|
Iterator find( const TQString &name ) KDE_NO_EXPORT;
|
||
15 years ago
|
};
|
||
|
|
||
|
typedef KHTMLFrameList::ConstIterator ConstFrameIt;
|
||
|
typedef KHTMLFrameList::Iterator FrameIt;
|
||
|
|
||
12 years ago
|
static int tdehtml_part_dcop_counter = 0;
|
||
15 years ago
|
|
||
|
|
||
14 years ago
|
class KHTMLWalletQueue : public TQObject
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
14 years ago
|
KHTMLWalletQueue(TQObject *parent) : TQObject(parent) {
|
||
15 years ago
|
#ifndef KHTML_NO_WALLET
|
||
|
wallet = 0L;
|
||
|
#endif // KHTML_NO_WALLET
|
||
|
}
|
||
|
|
||
|
virtual ~KHTMLWalletQueue() {
|
||
|
#ifndef KHTML_NO_WALLET
|
||
|
delete wallet;
|
||
|
wallet = 0L;
|
||
|
#endif // KHTML_NO_WALLET
|
||
|
}
|
||
|
#ifndef KHTML_NO_WALLET
|
||
|
KWallet::Wallet *wallet;
|
||
|
#endif // KHTML_NO_WALLET
|
||
14 years ago
|
typedef QPair<DOM::HTMLFormElementImpl*, TQGuardedPtr<DOM::DocumentImpl> > Caller;
|
||
|
typedef TQValueList<Caller> CallerList;
|
||
15 years ago
|
CallerList callers;
|
||
14 years ago
|
TQValueList<QPair<TQString, TQMap<TQString, TQString> > > savers;
|
||
15 years ago
|
|
||
|
signals:
|
||
|
void walletOpened(KWallet::Wallet*);
|
||
|
|
||
|
public slots:
|
||
|
void walletOpened(bool success) {
|
||
|
#ifndef KHTML_NO_WALLET
|
||
|
if (!success) {
|
||
|
delete wallet;
|
||
|
wallet = 0L;
|
||
|
}
|
||
|
emit walletOpened(wallet);
|
||
|
if (wallet) {
|
||
|
if (!wallet->hasFolder(KWallet::Wallet::FormDataFolder())) {
|
||
|
wallet->createFolder(KWallet::Wallet::FormDataFolder());
|
||
|
}
|
||
|
for (CallerList::Iterator i = callers.begin(); i != callers.end(); ++i) {
|
||
|
if ((*i).first && (*i).second) {
|
||
|
(*i).first->walletOpened(wallet);
|
||
|
}
|
||
|
}
|
||
|
wallet->setFolder(KWallet::Wallet::FormDataFolder());
|
||
14 years ago
|
for (TQValueList<QPair<TQString, TQMap<TQString, TQString> > >::Iterator i = savers.begin(); i != savers.end(); ++i) {
|
||
15 years ago
|
wallet->writeMap((*i).first, (*i).second);
|
||
|
}
|
||
|
}
|
||
|
callers.clear();
|
||
|
savers.clear();
|
||
|
wallet = 0L; // gave it away
|
||
|
#endif // KHTML_NO_WALLET
|
||
|
}
|
||
|
};
|
||
|
|
||
|
class KHTMLPartPrivate
|
||
|
{
|
||
|
KHTMLPartPrivate(const KHTMLPartPrivate & other);
|
||
|
KHTMLPartPrivate& operator=(const KHTMLPartPrivate&);
|
||
|
public:
|
||
14 years ago
|
KHTMLPartPrivate(TQObject* parent)
|
||
15 years ago
|
{
|
||
|
m_doc = 0L;
|
||
|
m_decoder = 0L;
|
||
|
m_wallet = 0L;
|
||
|
m_bWalletOpened = false;
|
||
|
m_runningScripts = 0;
|
||
|
m_job = 0L;
|
||
|
m_bComplete = true;
|
||
|
m_bLoadEventEmitted = true;
|
||
12 years ago
|
m_cachePolicy = TDEIO::CC_Verify;
|
||
15 years ago
|
m_manager = 0L;
|
||
|
m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
|
||
|
m_bClearing = false;
|
||
|
m_bCleared = false;
|
||
|
m_zoomFactor = 100;
|
||
|
m_bDnd = true;
|
||
|
m_startOffset = m_endOffset = 0;
|
||
|
m_startBeforeEnd = true;
|
||
|
m_extendAtEnd = true;
|
||
|
m_linkCursor = KCursor::handCursor();
|
||
|
m_loadedObjects = 0;
|
||
|
m_totalObjectCount = 0;
|
||
|
m_jobPercent = 0;
|
||
|
m_haveEncoding = false;
|
||
|
m_activeFrame = 0L;
|
||
14 years ago
|
m_find = 0;
|
||
|
m_findDialog = 0;
|
||
15 years ago
|
m_ssl_in_use = false;
|
||
|
m_jsedlg = 0;
|
||
|
m_formNotification = KHTMLPart::NoNotification;
|
||
|
|
||
|
#ifndef Q_WS_QWS
|
||
|
m_javaContext = 0;
|
||
|
#endif
|
||
|
m_cacheId = 0;
|
||
|
m_frameNameId = 1;
|
||
|
|
||
|
m_restored = false;
|
||
|
m_restoreScrollPosition = false;
|
||
|
|
||
|
m_focusNodeNumber = -1;
|
||
|
m_focusNodeRestored = false;
|
||
|
|
||
|
m_bJScriptForce = false;
|
||
|
m_bJScriptOverride = false;
|
||
|
m_bJavaForce = false;
|
||
|
m_bJavaOverride = false;
|
||
|
m_bPluginsForce = false;
|
||
|
m_bPluginsOverride = false;
|
||
|
m_onlyLocalReferences = false;
|
||
|
|
||
|
m_caretMode = false;
|
||
|
m_designMode = false;
|
||
|
|
||
|
m_metaRefreshEnabled = true;
|
||
|
m_statusMessagesEnabled = true;
|
||
|
|
||
|
m_bFirstData = true;
|
||
|
m_submitForm = 0;
|
||
|
m_delayRedirect = 0;
|
||
12 years ago
|
m_autoDetectLanguage = tdehtml::Decoder::SemiautomaticDetection;
|
||
15 years ago
|
|
||
|
// inherit settings from parent
|
||
|
if(parent && parent->inherits("KHTMLPart"))
|
||
|
{
|
||
|
KHTMLPart* part = static_cast<KHTMLPart*>(parent);
|
||
|
if(part->d)
|
||
|
{
|
||
|
m_bJScriptForce = part->d->m_bJScriptForce;
|
||
|
m_bJScriptOverride = part->d->m_bJScriptOverride;
|
||
|
m_bJavaForce = part->d->m_bJavaForce;
|
||
|
m_bJavaOverride = part->d->m_bJavaOverride;
|
||
|
m_bPluginsForce = part->d->m_bPluginsForce;
|
||
|
m_bPluginsOverride = part->d->m_bPluginsOverride;
|
||
|
// Same for SSL settings
|
||
|
m_ssl_in_use = part->d->m_ssl_in_use;
|
||
|
m_onlyLocalReferences = part->d->m_onlyLocalReferences;
|
||
|
m_caretMode = part->d->m_caretMode;
|
||
|
m_designMode = part->d->m_designMode;
|
||
|
m_zoomFactor = part->d->m_zoomFactor;
|
||
|
m_autoDetectLanguage = part->d->m_autoDetectLanguage;
|
||
|
m_encoding = part->d->m_encoding;
|
||
|
m_haveEncoding = part->d->m_haveEncoding;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
m_focusNodeNumber = -1;
|
||
|
m_focusNodeRestored = false;
|
||
|
m_opener = 0;
|
||
|
m_openedByJS = false;
|
||
|
m_newJSInterpreterExists = false;
|
||
|
m_dcopobject = 0;
|
||
|
m_jobspeed = 0;
|
||
12 years ago
|
m_dcop_counter = ++tdehtml_part_dcop_counter;
|
||
15 years ago
|
m_statusBarWalletLabel = 0L;
|
||
|
m_statusBarUALabel = 0L;
|
||
|
m_statusBarJSErrorLabel = 0L;
|
||
|
m_userStyleSheetLastModified = 0;
|
||
|
m_wq = 0;
|
||
|
}
|
||
|
~KHTMLPartPrivate()
|
||
|
{
|
||
|
delete m_dcopobject;
|
||
|
delete m_statusBarExtension;
|
||
|
delete m_extension;
|
||
|
delete m_settings;
|
||
|
#ifndef KHTML_NO_WALLET
|
||
|
delete m_wallet;
|
||
|
#endif
|
||
|
#ifndef Q_WS_QWS
|
||
|
//delete m_javaContext;
|
||
|
#endif
|
||
|
}
|
||
|
|
||
12 years ago
|
TQGuardedPtr<tdehtml::ChildFrame> m_frame;
|
||
15 years ago
|
KHTMLFrameList m_frames;
|
||
|
KHTMLFrameList m_objects;
|
||
|
|
||
14 years ago
|
TQGuardedPtr<KHTMLView> m_view;
|
||
15 years ago
|
KHTMLPartBrowserExtension *m_extension;
|
||
|
KParts::StatusBarExtension *m_statusBarExtension;
|
||
|
KHTMLPartBrowserHostExtension *m_hostExtension;
|
||
|
KURLLabel* m_statusBarIconLabel;
|
||
|
KURLLabel* m_statusBarWalletLabel;
|
||
|
KURLLabel* m_statusBarUALabel;
|
||
|
KURLLabel* m_statusBarJSErrorLabel;
|
||
|
KURLLabel* m_statusBarPopupLabel;
|
||
14 years ago
|
TQValueList<TQGuardedPtr<KHTMLPart> > m_suppressedPopupOriginParts;
|
||
15 years ago
|
int m_openableSuppressedPopups;
|
||
|
DOM::DocumentImpl *m_doc;
|
||
12 years ago
|
tdehtml::Decoder *m_decoder;
|
||
14 years ago
|
TQString m_encoding;
|
||
|
TQString m_sheetUsed;
|
||
15 years ago
|
long m_cacheId;
|
||
14 years ago
|
TQString scheduledScript;
|
||
15 years ago
|
DOM::Node scheduledScriptNode;
|
||
|
|
||
|
KWallet::Wallet* m_wallet;
|
||
|
int m_runningScripts;
|
||
|
bool m_bOpenMiddleClick :1;
|
||
|
bool m_bBackRightClick :1;
|
||
|
bool m_bJScriptEnabled :1;
|
||
|
bool m_bJScriptDebugEnabled :1;
|
||
|
bool m_bJavaEnabled :1;
|
||
|
bool m_bPluginsEnabled :1;
|
||
|
bool m_bJScriptForce :1;
|
||
|
bool m_bJScriptOverride :1;
|
||
|
bool m_bJavaForce :1;
|
||
|
bool m_bJavaOverride :1;
|
||
|
bool m_bPluginsForce :1;
|
||
|
bool m_metaRefreshEnabled :1;
|
||
|
bool m_bPluginsOverride :1;
|
||
|
bool m_restored :1;
|
||
|
bool m_restoreScrollPosition :1;
|
||
|
bool m_statusMessagesEnabled :1;
|
||
|
bool m_bWalletOpened :1;
|
||
|
bool m_urlSelectedOpenedURL:1; // KDE4: remove
|
||
|
int m_frameNameId;
|
||
|
int m_dcop_counter;
|
||
|
DCOPObject *m_dcopobject;
|
||
|
|
||
|
#ifndef Q_WS_QWS
|
||
|
KJavaAppletContext *m_javaContext;
|
||
|
#endif
|
||
|
|
||
|
KHTMLSettings *m_settings;
|
||
|
|
||
12 years ago
|
TDEIO::TransferJob * m_job;
|
||
15 years ago
|
|
||
14 years ago
|
TQString m_statusBarText[3];
|
||
15 years ago
|
unsigned long m_jobspeed;
|
||
14 years ago
|
TQString m_lastModified;
|
||
|
TQString m_httpHeaders;
|
||
|
TQString m_pageServices;
|
||
15 years ago
|
|
||
|
// QStrings for SSL metadata
|
||
|
// Note: When adding new variables don't forget to update ::saveState()/::restoreState()!
|
||
|
bool m_ssl_in_use;
|
||
14 years ago
|
TQString m_ssl_peer_certificate,
|
||
15 years ago
|
m_ssl_peer_chain,
|
||
|
m_ssl_peer_ip,
|
||
|
m_ssl_cipher,
|
||
|
m_ssl_cipher_desc,
|
||
|
m_ssl_cipher_version,
|
||
|
m_ssl_cipher_used_bits,
|
||
|
m_ssl_cipher_bits,
|
||
|
m_ssl_cert_state,
|
||
|
m_ssl_parent_ip,
|
||
|
m_ssl_parent_cert;
|
||
|
|
||
|
bool m_bComplete:1;
|
||
|
bool m_bLoadEventEmitted:1;
|
||
|
bool m_haveEncoding:1;
|
||
|
bool m_onlyLocalReferences :1;
|
||
|
bool m_redirectLockHistory:1;
|
||
|
|
||
|
KURL m_workingURL;
|
||
|
|
||
12 years ago
|
TDEIO::CacheControl m_cachePolicy;
|
||
14 years ago
|
TQTimer m_redirectionTimer;
|
||
|
TQTime m_parsetime;
|
||
15 years ago
|
int m_delayRedirect;
|
||
14 years ago
|
TQString m_redirectURL;
|
||
15 years ago
|
|
||
|
KAction *m_paViewDocument;
|
||
|
KAction *m_paViewFrame;
|
||
|
KAction *m_paViewInfo;
|
||
|
KAction *m_paSaveBackground;
|
||
|
KAction *m_paSaveDocument;
|
||
|
KAction *m_paSaveFrame;
|
||
|
KAction *m_paSecurity;
|
||
|
KActionMenu *m_paSetEncoding;
|
||
|
KSelectAction *m_paUseStylesheet;
|
||
|
KHTMLZoomFactorAction *m_paIncZoomFactor;
|
||
|
KHTMLZoomFactorAction *m_paDecZoomFactor;
|
||
|
KAction *m_paLoadImages;
|
||
|
KAction *m_paFind;
|
||
|
KAction *m_paFindNext;
|
||
|
KAction *m_paFindPrev;
|
||
|
KAction *m_paFindAheadText;
|
||
|
KAction *m_paFindAheadLinks;
|
||
|
KAction *m_paPrintFrame;
|
||
|
KAction *m_paSelectAll;
|
||
|
KAction *m_paDebugScript;
|
||
|
KAction *m_paDebugDOMTree;
|
||
|
KAction *m_paDebugRenderTree;
|
||
|
KAction *m_paStopAnimations;
|
||
|
KToggleAction *m_paToggleCaretMode;
|
||
|
|
||
|
KParts::PartManager *m_manager;
|
||
|
|
||
14 years ago
|
TQString m_popupMenuXML;
|
||
15 years ago
|
KHTMLPart::GUIProfile m_guiProfile;
|
||
|
|
||
|
int m_zoomFactor;
|
||
|
|
||
14 years ago
|
TQString m_strSelectedURL;
|
||
|
TQString m_strSelectedURLTarget;
|
||
|
TQString m_referrer;
|
||
|
TQString m_pageReferrer;
|
||
15 years ago
|
|
||
|
struct SubmitForm
|
||
|
{
|
||
|
const char *submitAction;
|
||
14 years ago
|
TQString submitUrl;
|
||
|
TQByteArray submitFormData;
|
||
|
TQString target;
|
||
|
TQString submitContentType;
|
||
|
TQString submitBoundary;
|
||
15 years ago
|
};
|
||
|
|
||
|
SubmitForm *m_submitForm;
|
||
|
|
||
|
bool m_bMousePressed;
|
||
|
bool m_bRightMousePressed;
|
||
|
DOM::Node m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
|
||
|
|
||
|
// simply using the selection limits for the caret position does not suffice
|
||
|
// as we need to know on which side to extend the selection
|
||
|
// DOM::Node m_caretNode; // node containing the caret
|
||
|
// long m_caretOffset; // offset within this node (0-based)
|
||
|
|
||
|
// the caret uses the selection variables for its position. If m_extendAtEnd
|
||
|
// is true, m_selectionEnd and m_endOffset contain the mandatory caret
|
||
|
// position, otherwise it's m_selectionStart and m_startOffset.
|
||
|
DOM::Node m_selectionStart;
|
||
|
long m_startOffset;
|
||
|
DOM::Node m_selectionEnd;
|
||
|
long m_endOffset;
|
||
|
DOM::Node m_initialNode; // (Node, Offset) pair on which the
|
||
|
long m_initialOffset; // selection has been initiated
|
||
14 years ago
|
TQString m_overURL;
|
||
|
TQString m_overURLTarget;
|
||
15 years ago
|
|
||
|
bool m_startBeforeEnd;
|
||
|
bool m_extendAtEnd; // true if selection is to be extended at its end
|
||
|
enum { ExtendByChar, ExtendByWord, ExtendByLine } m_extendMode;
|
||
|
bool m_bDnd;
|
||
|
bool m_bFirstData;
|
||
|
bool m_bClearing;
|
||
|
bool m_bCleared;
|
||
|
bool m_bSecurityInQuestion;
|
||
|
bool m_focusNodeRestored;
|
||
|
|
||
|
int m_focusNodeNumber;
|
||
|
|
||
14 years ago
|
TQPoint m_dragStartPos;
|
||
15 years ago
|
#ifdef KHTML_NO_SELECTION
|
||
14 years ago
|
TQPoint m_dragLastPos;
|
||
15 years ago
|
#endif
|
||
|
|
||
|
bool m_designMode;
|
||
|
bool m_caretMode;
|
||
|
|
||
14 years ago
|
TQCursor m_linkCursor;
|
||
|
TQTimer m_scrollTimer;
|
||
15 years ago
|
|
||
|
unsigned long m_loadedObjects;
|
||
|
unsigned long m_totalObjectCount;
|
||
|
unsigned int m_jobPercent;
|
||
|
|
||
|
KHTMLPart::FormNotification m_formNotification;
|
||
14 years ago
|
TQTimer m_progressUpdateTimer;
|
||
15 years ago
|
|
||
14 years ago
|
TQStringList m_pluginPageQuestionAsked;
|
||
15 years ago
|
|
||
|
/////////// 'Find' feature
|
||
|
struct StringPortion
|
||
|
{
|
||
|
// Just basic ref/deref on our node to make sure it doesn't get deleted
|
||
|
StringPortion( int i, DOM::NodeImpl* n ) : index(i), node(n) { if (node) node->ref(); }
|
||
|
StringPortion() : index(0), node(0) {} // for QValueList
|
||
|
StringPortion( const StringPortion& other ) : node(0) { operator=(other); }
|
||
|
StringPortion& operator=( const StringPortion& other ) {
|
||
|
index=other.index;
|
||
|
if (other.node) other.node->ref();
|
||
|
if (node) node->deref();
|
||
|
node=other.node;
|
||
|
return *this;
|
||
|
}
|
||
|
~StringPortion() { if (node) node->deref(); }
|
||
|
|
||
|
int index;
|
||
|
DOM::NodeImpl *node;
|
||
|
};
|
||
14 years ago
|
TQValueList<StringPortion> m_stringPortions;
|
||
15 years ago
|
|
||
14 years ago
|
KFind *m_find;
|
||
|
KFindDialog *m_findDialog;
|
||
15 years ago
|
|
||
14 years ago
|
struct findState
|
||
15 years ago
|
{
|
||
14 years ago
|
findState() : options( 0 ), last_dir( -1 ) {}
|
||
14 years ago
|
TQStringList history;
|
||
|
TQString text;
|
||
15 years ago
|
int options;
|
||
|
int last_dir; // -1=unknown,0=forward,1=backward
|
||
|
};
|
||
|
|
||
14 years ago
|
findState m_lastFindState;
|
||
15 years ago
|
|
||
|
KJSErrorDlg *m_jsedlg;
|
||
|
|
||
14 years ago
|
DOM::NodeImpl *m_findNode; // current node
|
||
|
DOM::NodeImpl *m_findNodeEnd; // end node
|
||
|
DOM::NodeImpl *m_findNodeStart; // start node
|
||
|
DOM::NodeImpl *m_findNodePrevious; // previous node used for find
|
||
|
int m_findPos; // current pos in current node
|
||
|
int m_findPosEnd; // pos in end node
|
||
|
int m_findPosStart; // pos in start node
|
||
15 years ago
|
/////////
|
||
|
|
||
14 years ago
|
//TQGuardedPtr<KParts::Part> m_activeFrame;
|
||
15 years ago
|
KParts::Part * m_activeFrame;
|
||
14 years ago
|
TQGuardedPtr<KHTMLPart> m_opener;
|
||
15 years ago
|
bool m_openedByJS;
|
||
|
bool m_newJSInterpreterExists; // set to 1 by setOpenedByJS, for window.open
|
||
|
|
||
12 years ago
|
tdehtml::Decoder::AutoDetectLanguage m_autoDetectLanguage;
|
||
15 years ago
|
KPopupMenu *m_automaticDetection;
|
||
|
KSelectAction *m_manualDetection;
|
||
|
|
||
|
void setFlagRecursively(bool KHTMLPartPrivate::*flag, bool value);
|
||
|
/** returns the caret node */
|
||
|
DOM::Node &caretNode() {
|
||
|
return m_extendAtEnd ? m_selectionEnd : m_selectionStart;
|
||
|
}
|
||
|
/** returns the caret offset */
|
||
|
long &caretOffset() {
|
||
|
return m_extendAtEnd ? m_endOffset : m_startOffset;
|
||
|
}
|
||
|
|
||
|
time_t m_userStyleSheetLastModified;
|
||
|
|
||
|
KHTMLWalletQueue *m_wq;
|
||
|
};
|
||
|
|
||
|
#endif
|