summaryrefslogtreecommitdiffstats
path: root/tdehtml/ecma
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 15:54:26 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 15:54:26 -0600
commit7427e438358d44c37e3c8b0a9cfbb225ffd60e79 (patch)
treed977f1d23d324f23aadee0ad50acb94d7436ba80 /tdehtml/ecma
parent72eecb041bf15bf64b748fc062d55f6ec860ac60 (diff)
downloadtdelibs-7427e438358d44c37e3c8b0a9cfbb225ffd60e79.tar.gz
tdelibs-7427e438358d44c37e3c8b0a9cfbb225ffd60e79.zip
Rename KHTML and kiobuffer
Diffstat (limited to 'tdehtml/ecma')
-rw-r--r--tdehtml/ecma/README4
-rw-r--r--tdehtml/ecma/kjs_binding.cpp2
-rw-r--r--tdehtml/ecma/kjs_debugwin.cpp10
-rw-r--r--tdehtml/ecma/kjs_dom.cpp26
-rw-r--r--tdehtml/ecma/kjs_events.cpp4
-rw-r--r--tdehtml/ecma/kjs_html.cpp34
-rw-r--r--tdehtml/ecma/kjs_mozilla.cpp4
-rw-r--r--tdehtml/ecma/kjs_mozilla.h8
-rw-r--r--tdehtml/ecma/kjs_navigator.cpp2
-rw-r--r--tdehtml/ecma/kjs_navigator.h8
-rw-r--r--tdehtml/ecma/kjs_proxy.cpp8
-rw-r--r--tdehtml/ecma/kjs_proxy.h6
-rw-r--r--tdehtml/ecma/kjs_traversal.cpp4
-rw-r--r--tdehtml/ecma/kjs_window.cpp150
-rw-r--r--tdehtml/ecma/kjs_window.h12
-rw-r--r--tdehtml/ecma/testecma.cpp2
-rw-r--r--tdehtml/ecma/xmlhttprequest.cpp2
17 files changed, 143 insertions, 143 deletions
diff --git a/tdehtml/ecma/README b/tdehtml/ecma/README
index 4c341699a..f44d663a0 100644
--- a/tdehtml/ecma/README
+++ b/tdehtml/ecma/README
@@ -1,7 +1,7 @@
This module contains the ECMAScript a.k.a. JavaScript language bindings for
-the KHTML Part.
+the TDEHTML Part.
-The module is loaded into KHTML's address space on demand.
+The module is loaded into TDEHTML's address space on demand.
To test the non-HTML DOM functions you may compile a little interactive
interpreter called 'testecma' with 'make check' (see testecma.cpp for
diff --git a/tdehtml/ecma/kjs_binding.cpp b/tdehtml/ecma/kjs_binding.cpp
index 09961fbb5..d9f0b7b25 100644
--- a/tdehtml/ecma/kjs_binding.cpp
+++ b/tdehtml/ecma/kjs_binding.cpp
@@ -232,7 +232,7 @@ bool ScriptInterpreter::isWindowOpenAllowed() const
bool eventOk = ( // mouse events
id == DOM::EventImpl::CLICK_EVENT ||
id == DOM::EventImpl::MOUSEUP_EVENT || id == DOM::EventImpl::MOUSEDOWN_EVENT ||
- id == DOM::EventImpl::KHTML_ECMA_CLICK_EVENT || id == DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT ||
+ id == DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT || id == DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT ||
// keyboard events
id == DOM::EventImpl::KEYDOWN_EVENT || id == DOM::EventImpl::KEYPRESS_EVENT ||
id == DOM::EventImpl::KEYUP_EVENT ||
diff --git a/tdehtml/ecma/kjs_debugwin.cpp b/tdehtml/ecma/kjs_debugwin.cpp
index 47921fb2a..ec794b8d2 100644
--- a/tdehtml/ecma/kjs_debugwin.cpp
+++ b/tdehtml/ecma/kjs_debugwin.cpp
@@ -249,12 +249,12 @@ KJSDebugWin * KJSDebugWin::kjs_html_debugger = 0;
TQString SourceFile::getCode()
{
if (interpreter) {
- KHTMLPart *part = ::tqqt_cast<KHTMLPart*>(static_cast<ScriptInterpreter*>(interpreter)->part());
- if (part && url == part->url().url() && KHTMLPageCache::self()->isValid(part->cacheId())) {
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart*>(static_cast<ScriptInterpreter*>(interpreter)->part());
+ if (part && url == part->url().url() && TDEHTMLPageCache::self()->isValid(part->cacheId())) {
Decoder *decoder = part->createDecoder();
TQByteArray data;
TQDataStream stream(data,IO_WriteOnly);
- KHTMLPageCache::self()->saveData(part->cacheId(),&stream);
+ TDEHTMLPageCache::self()->saveData(part->cacheId(),&stream);
TQString str;
if (data.size() == 0)
str = "";
@@ -721,7 +721,7 @@ bool KJSDebugWin::sourceParsed(KJS::ExecState *exec, int sourceId,
KParts::ReadOnlyPart *part = static_cast<ScriptInterpreter*>(exec->interpreter())->part();
if (m_nextSourceUrl == part->url().url()) {
// Only store the code here if it's not from the part's html page... in that
- // case we can get it from KHTMLPageCache
+ // case we can get it from TDEHTMLPageCache
code = TQString::null;
}
@@ -805,7 +805,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
return true;
KParts::ReadOnlyPart *part = static_cast<ScriptInterpreter*>(exec->interpreter())->part();
- KHTMLPart *tdehtmlpart = ::tqqt_cast<KHTMLPart*>(part);
+ TDEHTMLPart *tdehtmlpart = ::tqqt_cast<TDEHTMLPart*>(part);
if (tdehtmlpart && !tdehtmlpart->settings()->isJavaScriptErrorReportingEnabled())
return true;
diff --git a/tdehtml/ecma/kjs_dom.cpp b/tdehtml/ecma/kjs_dom.cpp
index 71e91d7ef..77d4983da 100644
--- a/tdehtml/ecma/kjs_dom.cpp
+++ b/tdehtml/ecma/kjs_dom.cpp
@@ -265,11 +265,11 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
case OnChange:
return getListener(DOM::EventImpl::CHANGE_EVENT);
case OnClick:
- return getListener(DOM::EventImpl::KHTML_ECMA_CLICK_EVENT);
+ return getListener(DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT);
case OnDblClick:
- return getListener(DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT);
+ return getListener(DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT);
case OnDragDrop:
- return getListener(DOM::EventImpl::KHTML_DRAGDROP_EVENT);
+ return getListener(DOM::EventImpl::TDEHTML_DRAGDROP_EVENT);
case OnError:
return getListener(DOM::EventImpl::ERROR_EVENT);
case OnFocus:
@@ -293,7 +293,7 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
case OnMouseUp:
return getListener(DOM::EventImpl::MOUSEUP_EVENT);
case OnMove:
- return getListener(DOM::EventImpl::KHTML_MOVE_EVENT);
+ return getListener(DOM::EventImpl::TDEHTML_MOVE_EVENT);
case OnReset:
return getListener(DOM::EventImpl::RESET_EVENT);
case OnResize:
@@ -409,13 +409,13 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i
setListener(exec,DOM::EventImpl::CHANGE_EVENT,value);
break;
case OnClick:
- setListener(exec,DOM::EventImpl::KHTML_ECMA_CLICK_EVENT,value);
+ setListener(exec,DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT,value);
break;
case OnDblClick:
- setListener(exec,DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT,value);
+ setListener(exec,DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT,value);
break;
case OnDragDrop:
- setListener(exec,DOM::EventImpl::KHTML_DRAGDROP_EVENT,value);
+ setListener(exec,DOM::EventImpl::TDEHTML_DRAGDROP_EVENT,value);
break;
case OnError:
setListener(exec,DOM::EventImpl::ERROR_EVENT,value);
@@ -451,7 +451,7 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i
setListener(exec,DOM::EventImpl::MOUSEUP_EVENT,value);
break;
case OnMove:
- setListener(exec,DOM::EventImpl::KHTML_MOVE_EVENT,value);
+ setListener(exec,DOM::EventImpl::TDEHTML_MOVE_EVENT,value);
break;
case OnReset:
setListener(exec,DOM::EventImpl::RESET_EVENT,value);
@@ -949,7 +949,7 @@ Value DOMDocument::getValueProperty(ExecState *exec, int token) const
return getDOMStyleSheetList(exec, doc.styleSheets(), doc);
case DOMDocument::DefaultView: // DOM2
{
- KHTMLView *view = node.handle()->getDocument()->view();
+ TDEHTMLView *view = node.handle()->getDocument()->view();
if (view)
return Window::retrieve(view->part());
return getDOMAbstractView(exec, doc.defaultView());
@@ -963,7 +963,7 @@ Value DOMDocument::getValueProperty(ExecState *exec, int token) const
DOM::DocumentImpl* docimpl = node.handle()->getDocument();
if ( docimpl && docimpl->view() )
{
- KHTMLPart* part = docimpl->view()->part();
+ TDEHTMLPart* part = docimpl->view()->part();
if ( part ) {
if (part->d->m_bComplete) return String("complete");
if (docimpl->parsing()) return String("loading");
@@ -1088,7 +1088,7 @@ Value DOMDocumentProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
Window* active = Window::retrieveActive(exec);
// Complete the URL using the "active part" (running interpreter). We do this for the security
// check and to make sure we load exactly the same url as we have verified to be safe
- KHTMLPart *tdehtmlpart = ::tqqt_cast<KHTMLPart *>(active->part());
+ TDEHTMLPart *tdehtmlpart = ::tqqt_cast<TDEHTMLPart *>(active->part());
if (tdehtmlpart) {
// Security: only allow documents to be loaded from the same host
TQString dstUrl = tdehtmlpart->htmlDocument().completeURL(s).string();
@@ -1274,7 +1274,7 @@ Value DOMDOMImplementationProtoFunc::tryCall(ExecState *exec, Object &thisObj, c
case DOMDOMImplementation::CreateDocument: { // DOM2
// Initially set the URL to document of the creator... this is so that it resides in the same
// host/domain for security checks. The URL will be updated if Document.load() is called.
- KHTMLPart *part = ::tqqt_cast<KHTMLPart*>(static_cast<KJS::ScriptInterpreter*>(exec->interpreter())->part());
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart*>(static_cast<KJS::ScriptInterpreter*>(exec->interpreter())->part());
if (part) {
Document doc = implementation.createDocument(args[0].toString(exec).string(),args[1].toString(exec).string(),toNode(args[2]));
KURL url = static_cast<DocumentImpl*>(part->document().handle())->URL();
@@ -1526,7 +1526,7 @@ bool checkNodeSecurity(ExecState *exec, const DOM::Node& n)
// Check to see if the currently executing interpreter is allowed to access the specified node
if (n.isNull())
return true;
- KHTMLView *view = n.handle()->getDocument()->view();
+ TDEHTMLView *view = n.handle()->getDocument()->view();
Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
if ( !win || !win->isSafeScript(exec) )
return false;
diff --git a/tdehtml/ecma/kjs_events.cpp b/tdehtml/ecma/kjs_events.cpp
index 7b6ff3cc1..acf88f89a 100644
--- a/tdehtml/ecma/kjs_events.cpp
+++ b/tdehtml/ecma/kjs_events.cpp
@@ -63,7 +63,7 @@ void JSEventListener::handleEvent(DOM::Event &evt)
if (KJSDebugWin::debugWindow() && KJSDebugWin::debugWindow()->inSession())
return;
#endif
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(static_cast<Window*>(win.imp())->part());
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(static_cast<Window*>(win.imp())->part());
KJSProxy *proxy = 0L;
if (part)
proxy = part->jScript();
@@ -163,7 +163,7 @@ Object JSLazyEventListener::listenerObj() const
void JSLazyEventListener::parseCode() const
{
if (!parsed) {
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(static_cast<Window*>(win.imp())->part());
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(static_cast<Window*>(win.imp())->part());
KJSProxy *proxy = 0L;
if (part)
proxy = part->jScript();
diff --git a/tdehtml/ecma/kjs_html.cpp b/tdehtml/ecma/kjs_html.cpp
index 37fd70754..8a63ba943 100644
--- a/tdehtml/ecma/kjs_html.cpp
+++ b/tdehtml/ecma/kjs_html.cpp
@@ -98,7 +98,7 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List
case HTMLDocument::Open:
if (args.size() >= 3) // IE extension for document.open: it means window.open if it has 3 args or more
{
- KHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
+ TDEHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
if ( view && view->part() ) {
Window* win = Window::retrieveWindow(view->part());
if( win ) {
@@ -133,7 +133,7 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List
case HTMLDocument::GetSelection: {
// NS4 and Mozilla specific. IE uses document.selection.createRange()
// http://docs.sun.com/source/816-6408-10/document.htm#1195981
- KHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
+ TDEHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
if ( view && view->part() )
return String(view->part()->selectedText());
else
@@ -199,7 +199,7 @@ bool KJS::HTMLDocument::hasProperty(ExecState *exec, const Identifier &p) const
#endif
DOM::HTMLDocument doc = static_cast<DOM::HTMLDocument>(node);
DOM::DocumentImpl* docImpl = static_cast<DOM::DocumentImpl*>(doc.handle());
- KHTMLView *view = docImpl->view();
+ TDEHTMLView *view = docImpl->view();
Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
if ( !win || !win->isSafeScript(exec) )
return false;
@@ -210,7 +210,7 @@ bool KJS::HTMLDocument::hasProperty(ExecState *exec, const Identifier &p) const
if ( view && view->part() )
{
- KHTMLPart *kp = view->part()->findFrame( p.qstring() );
+ TDEHTMLPart *kp = view->part()->findFrame( p.qstring() );
if (kp)
return true;
}
@@ -226,7 +226,7 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName)
DOM::HTMLDocument doc = static_cast<DOM::HTMLDocument>(node);
DOM::DocumentImpl* docImpl = static_cast<DOM::DocumentImpl*>(doc.handle());
- KHTMLView *view = docImpl->view();
+ TDEHTMLView *view = docImpl->view();
Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
if ( !win || !win->isSafeScript(exec) )
@@ -261,7 +261,7 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName)
{
// ###### TODO return a collection in case several frames have the same name
// (IE does that). Hard to do with findFrame :}
- KHTMLPart *kp = view->part()->findFrame( propertyName.qstring() );
+ TDEHTMLPart *kp = view->part()->findFrame( propertyName.qstring() );
if (kp)
return Window::retrieve(kp);
}
@@ -356,7 +356,7 @@ void KJS::HTMLDocument::tryPut(ExecState *exec, const Identifier &propertyName,
#ifdef KJS_VERBOSE
kdDebug(6070) << "KJS::HTMLDocument::tryPut " << propertyName.qstring() << endl;
#endif
- KHTMLView *view = static_cast<DOM::DocumentImpl*>(node.handle())->view();
+ TDEHTMLView *view = static_cast<DOM::DocumentImpl*>(node.handle())->view();
Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
if ( !win || !win->isSafeScript(exec) )
@@ -394,7 +394,7 @@ void KJS::HTMLDocument::putValueProperty(ExecState *exec, int token, const Value
break;
case Location:
{
- KHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
+ TDEHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
if ( view )
Window::retrieveWindow(view->part())->goURL(exec, value.toString(exec).qstring(), false /*don't lock history*/);
break;
@@ -1127,7 +1127,7 @@ const ClassInfo* KJS::HTMLElement::classInfo() const
static KParts::LiveConnectExtension *getLiveConnectExtension(const DOM::HTMLElement & element)
{
DOM::HTMLDocument doc = element.ownerDocument();
- KHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
+ TDEHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
if (view && element.handle())
return view->part()->liveConnectExtension(static_cast<tdehtml::RenderPart*>(element.handle()->renderer()));
return 0L;
@@ -1870,7 +1870,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
case FrameContentDocument: return checkNodeSecurity(exec,frameElement.contentDocument()) ?
getDOMNode(exec, frameElement.contentDocument()) : Undefined();
case FrameContentWindow: {
- KHTMLPart* part = static_cast<DOM::HTMLFrameElementImpl*>(frameElement.handle())->contentPart();
+ TDEHTMLPart* part = static_cast<DOM::HTMLFrameElementImpl*>(frameElement.handle())->contentPart();
if (part) {
Window *w = Window::retrieveWindow(part);
if (w)
@@ -1905,7 +1905,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
case IFrameContentDocument: return checkNodeSecurity(exec,iFrame.contentDocument()) ?
getDOMNode(exec, iFrame.contentDocument()) : Undefined();
case IFrameContentWindow: {
- KHTMLPart* part = static_cast<DOM::HTMLIFrameElementImpl*>(iFrame.handle())->contentPart();
+ TDEHTMLPart* part = static_cast<DOM::HTMLIFrameElementImpl*>(iFrame.handle())->contentPart();
if (part) {
Window *w = Window::retrieveWindow(part);
if (w)
@@ -2123,14 +2123,14 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
DOM::HTMLDocument doc = element.ownerDocument();
- KHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
- KHTMLSettings::KJSWindowOpenPolicy policy = KHTMLSettings::KJSWindowOpenAllow;
+ TDEHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
+ TDEHTMLSettings::KJSWindowOpenPolicy policy = TDEHTMLSettings::KJSWindowOpenAllow;
if (view)
policy = view->part()->settings()->windowOpenPolicy(view->part()->url().host());
bool block = false;
- if ( policy != KHTMLSettings::KJSWindowOpenAllow ) {
+ if ( policy != TDEHTMLSettings::KJSWindowOpenAllow ) {
block = true;
// if this is a form without a target, or a special target, don't block
@@ -2146,7 +2146,7 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
if (!view->part()->url().host().isEmpty())
caption = view->part()->url().host() + " - ";
// search all (possibly nested) framesets
- KHTMLPart *currentPart = view->part()->parentPart();
+ TDEHTMLPart *currentPart = view->part()->parentPart();
while( currentPart != 0L ) {
if( currentPart->frameExists( form.target().string() ) )
block = false;
@@ -2154,7 +2154,7 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
}
}
- if ( block && policy == KHTMLSettings::KJSWindowOpenAsk && view ) {
+ if ( block && policy == TDEHTMLSettings::KJSWindowOpenAsk && view ) {
if (view && view->part())
emit view->part()->browserExtension()->requestFocus(view->part());
caption += i18n( "Confirmation: JavaScript Popup" );
@@ -2167,7 +2167,7 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
caption, i18n("Allow"), i18n("Do Not Allow") ) == KMessageBox::Yes )
block = false;
- } else if ( block && policy == KHTMLSettings::KJSWindowOpenSmart ) {
+ } else if ( block && policy == TDEHTMLSettings::KJSWindowOpenSmart ) {
if( static_cast<KJS::ScriptInterpreter *>(exec->interpreter())->isWindowOpenAllowed() ) {
// This submission has been triggered by the user
block = false;
diff --git a/tdehtml/ecma/kjs_mozilla.cpp b/tdehtml/ecma/kjs_mozilla.cpp
index 216fde26e..6fc7688dd 100644
--- a/tdehtml/ecma/kjs_mozilla.cpp
+++ b/tdehtml/ecma/kjs_mozilla.cpp
@@ -40,7 +40,7 @@ const ClassInfo MozillaSidebarExtension::info = { "sidebar", 0, &MozillaSidebarE
}
IMPLEMENT_PROTOFUNC_DOM(MozillaSidebarExtensionFunc)
-MozillaSidebarExtension::MozillaSidebarExtension(ExecState *exec, KHTMLPart *p)
+MozillaSidebarExtension::MozillaSidebarExtension(ExecState *exec, TDEHTMLPart *p)
: ObjectImp(exec->interpreter()->builtinObjectPrototype()), m_part(p) { }
Value MozillaSidebarExtension::get(ExecState *exec, const Identifier &propertyName) const
@@ -66,7 +66,7 @@ Value MozillaSidebarExtensionFunc::tryCall(ExecState *exec, Object &thisObj, con
KJS_CHECK_THIS( KJS::MozillaSidebarExtension, thisObj );
MozillaSidebarExtension *mse = static_cast<MozillaSidebarExtension*>(thisObj.imp());
- KHTMLPart *part = mse->part();
+ TDEHTMLPart *part = mse->part();
if (!part)
return Undefined();
diff --git a/tdehtml/ecma/kjs_mozilla.h b/tdehtml/ecma/kjs_mozilla.h
index 220094f63..112af1315 100644
--- a/tdehtml/ecma/kjs_mozilla.h
+++ b/tdehtml/ecma/kjs_mozilla.h
@@ -23,21 +23,21 @@
#include <kjs/object.h>
-class KHTMLPart;
+class TDEHTMLPart;
namespace KJS {
class MozillaSidebarExtension : public ObjectImp {
public:
- MozillaSidebarExtension(ExecState *exec, KHTMLPart *p);
+ MozillaSidebarExtension(ExecState *exec, TDEHTMLPart *p);
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
Value getValueProperty(ExecState *exec, int token) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
enum { addPanel };
- KHTMLPart *part() const { return m_part; }
+ TDEHTMLPart *part() const { return m_part; }
private:
- KHTMLPart *m_part;
+ TDEHTMLPart *m_part;
};
} // namespace
diff --git a/tdehtml/ecma/kjs_navigator.cpp b/tdehtml/ecma/kjs_navigator.cpp
index 22d5f9cb7..5934afd3e 100644
--- a/tdehtml/ecma/kjs_navigator.cpp
+++ b/tdehtml/ecma/kjs_navigator.cpp
@@ -165,7 +165,7 @@ const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
*/
IMPLEMENT_PROTOFUNC_DOM(NavigatorFunc)
-Navigator::Navigator(ExecState *exec, KHTMLPart *p)
+Navigator::Navigator(ExecState *exec, TDEHTMLPart *p)
: ObjectImp(exec->interpreter()->builtinObjectPrototype()), m_part(p) { }
Value Navigator::get(ExecState *exec, const Identifier &propertyName) const
diff --git a/tdehtml/ecma/kjs_navigator.h b/tdehtml/ecma/kjs_navigator.h
index ccd1ba63b..9298b3761 100644
--- a/tdehtml/ecma/kjs_navigator.h
+++ b/tdehtml/ecma/kjs_navigator.h
@@ -23,13 +23,13 @@
#include <kjs/object.h>
-class KHTMLPart;
+class TDEHTMLPart;
namespace KJS {
class Navigator : public ObjectImp {
public:
- Navigator(ExecState *exec, KHTMLPart *p);
+ Navigator(ExecState *exec, TDEHTMLPart *p);
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
Value getValueProperty(ExecState *exec, int token) const;
virtual const ClassInfo* classInfo() const { return &info; }
@@ -37,9 +37,9 @@ namespace KJS {
enum { AppCodeName, AppName, AppVersion, Language, UserAgent, UserLanguage, Platform,
_Plugins, _MimeTypes, Product, ProductSub, Vendor, CookieEnabled, JavaEnabled,
BrowserLanguage, CpuClass };
- KHTMLPart *part() const { return m_part; }
+ TDEHTMLPart *part() const { return m_part; }
private:
- KHTMLPart *m_part;
+ TDEHTMLPart *m_part;
};
// Hashtable enums
diff --git a/tdehtml/ecma/kjs_proxy.cpp b/tdehtml/ecma/kjs_proxy.cpp
index cc7afa00a..578cd30f0 100644
--- a/tdehtml/ecma/kjs_proxy.cpp
+++ b/tdehtml/ecma/kjs_proxy.cpp
@@ -355,7 +355,7 @@ void KJSProxyImpl::applyUserAgent()
// If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
userAgent.find(TQString::fromLatin1("compatible")) == -1 &&
- userAgent.find(TQString::fromLatin1("KHTML")) == -1)
+ userAgent.find(TQString::fromLatin1("TDEHTML")) == -1)
{
m_script->setCompatMode(Interpreter::NetscapeCompat);
#ifdef KJS_VERBOSE
@@ -365,8 +365,8 @@ void KJSProxyImpl::applyUserAgent()
}
// Helper method, so that all classes which need jScript() don't need to be added
-// as friend to KHTMLPart
-KJSProxy * KJSProxy::proxy( KHTMLPart *part )
+// as friend to TDEHTMLPart
+KJSProxy * KJSProxy::proxy( TDEHTMLPart *part )
{
return part->jScript();
}
@@ -402,7 +402,7 @@ void KJSCPUGuard::stop()
bool KJSCPUGuard::confirmTerminate() {
kdDebug(6070) << "alarmhandler" << endl;
- return KMessageBox::warningYesNo(0L, i18n("A script on this page is causing KHTML to freeze. If it continues to run, other applications may become less responsive.\nDo you want to abort the script?"), i18n("JavaScript"), i18n("&Abort"), KStdGuiItem::cont(), "kjscupguard_alarmhandler") == KMessageBox::Yes;
+ return KMessageBox::warningYesNo(0L, i18n("A script on this page is causing TDEHTML to freeze. If it continues to run, other applications may become less responsive.\nDo you want to abort the script?"), i18n("JavaScript"), i18n("&Abort"), KStdGuiItem::cont(), "kjscupguard_alarmhandler") == KMessageBox::Yes;
}
void KJSCPUGuard::alarmHandler(int) {
diff --git a/tdehtml/ecma/kjs_proxy.h b/tdehtml/ecma/kjs_proxy.h
index 5ea2d5bf6..bac9e9579 100644
--- a/tdehtml/ecma/kjs_proxy.h
+++ b/tdehtml/ecma/kjs_proxy.h
@@ -26,7 +26,7 @@
#include <tqstring.h>
#include <sys/time.h>
-class KHTMLPart;
+class TDEHTMLPart;
namespace DOM {
class Node;
@@ -72,8 +72,8 @@ public:
tdehtml::ChildFrame *m_frame;
int m_handlerLineno;
- // Helper method, to access the private KHTMLPart::jScript()
- static KJSProxy *proxy( KHTMLPart *part );
+ // Helper method, to access the private TDEHTMLPart::jScript()
+ static KJSProxy *proxy( TDEHTMLPart *part );
};
class KJSCPUGuard {
diff --git a/tdehtml/ecma/kjs_traversal.cpp b/tdehtml/ecma/kjs_traversal.cpp
index b8b9e824a..a01d469de 100644
--- a/tdehtml/ecma/kjs_traversal.cpp
+++ b/tdehtml/ecma/kjs_traversal.cpp
@@ -302,11 +302,11 @@ JSNodeFilter::~JSNodeFilter()
short JSNodeFilter::acceptNode(const DOM::Node &n)
{
- KHTMLView *view = static_cast<DOM::DocumentImpl *>( n.handle()->docPtr() )->view();
+ TDEHTMLView *view = static_cast<DOM::DocumentImpl *>( n.handle()->docPtr() )->view();
if (!view)
return DOM::NodeFilter::FILTER_REJECT;
- KHTMLPart *part = view->part();
+ TDEHTMLPart *part = view->part();
KJSProxy *proxy = part->jScript();
if (proxy) {
ExecState *exec = proxy->interpreter()->globalExec();
diff --git a/tdehtml/ecma/kjs_window.cpp b/tdehtml/ecma/kjs_window.cpp
index 767c7607f..1d38de27e 100644
--- a/tdehtml/ecma/kjs_window.cpp
+++ b/tdehtml/ecma/kjs_window.cpp
@@ -77,7 +77,7 @@ namespace KJS {
class History : public ObjectImp {
friend class HistoryFunc;
public:
- History(ExecState *exec, KHTMLPart *p)
+ History(ExecState *exec, TDEHTMLPart *p)
: ObjectImp(exec->interpreter()->builtinObjectPrototype()), part(p) { }
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
Value getValueProperty(ExecState *exec, int token) const;
@@ -85,31 +85,31 @@ namespace KJS {
static const ClassInfo info;
enum { Back, Forward, Go, Length };
private:
- TQGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<TDEHTMLPart> part;
};
class External : public ObjectImp {
friend class ExternalFunc;
public:
- External(ExecState *exec, KHTMLPart *p)
+ External(ExecState *exec, TDEHTMLPart *p)
: ObjectImp(exec->interpreter()->builtinObjectPrototype()), part(p) { }
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
enum { AddFavorite };
private:
- TQGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<TDEHTMLPart> part;
};
class FrameArray : public ObjectImp {
public:
- FrameArray(ExecState *exec, KHTMLPart *p)
+ FrameArray(ExecState *exec, TDEHTMLPart *p)
: ObjectImp(exec->interpreter()->builtinObjectPrototype()), part(p) { }
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
virtual Value call(ExecState *exec, Object &thisObj, const List &args);
virtual bool implementsCall() const { return true; }
private:
- TQGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<TDEHTMLPart> part;
};
#ifdef Q_WS_QWS
@@ -421,7 +421,7 @@ Window *Window::retrieveWindow(KParts::ReadOnlyPart *p)
Object obj = Object::dynamicCast( retrieve( p ) );
#ifndef NDEBUG
// obj should never be null, except when javascript has been disabled in that part.
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(p);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(p);
if ( part && part->jScriptEnabled() )
{
assert( obj.isValid() );
@@ -448,10 +448,10 @@ Window *Window::retrieveActive(ExecState *exec)
Value Window::retrieve(KParts::ReadOnlyPart *p)
{
assert(p);
- KHTMLPart * part = ::tqqt_cast<KHTMLPart *>(p);
+ TDEHTMLPart * part = ::tqqt_cast<TDEHTMLPart *>(p);
KJSProxy *proxy = 0L;
if (!part) {
- part = ::tqqt_cast<KHTMLPart *>(p->parent());
+ part = ::tqqt_cast<TDEHTMLPart *>(p->parent());
if (part)
proxy = part->framejScript(p);
} else
@@ -478,7 +478,7 @@ Location *Window::location() const
ObjectImp* Window::frames( ExecState* exec ) const
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (part)
return m_frames ? m_frames :
(const_cast<Window*>(this)->m_frames = new FrameArray(exec, part));
@@ -516,7 +516,7 @@ bool Window::hasProperty(ExecState *exec, const Identifier &p) const
if (Lookup::findEntry(&WindowTable, p))
return true;
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part)
return false;
@@ -585,7 +585,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
}
const HashEntry* entry = Lookup::findEntry(&WindowTable, p);
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
// properties that work on all windows
if (entry) {
@@ -604,7 +604,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
}
if (!part)
return Undefined();
- // KHTMLPart next
+ // TDEHTMLPart next
switch(entry->value) {
case Frames:
return Value(frames(exec));
@@ -614,9 +614,9 @@ Value Window::get(ExecState *exec, const Identifier &p) const
else // doesn't work yet
return retrieve(part->opener());
case Parent:
- return retrieve(part->parentPart() ? part->parentPart() : (KHTMLPart*)part);
+ return retrieve(part->parentPart() ? part->parentPart() : (TDEHTMLPart*)part);
case Top: {
- KHTMLPart *p = part;
+ TDEHTMLPart *p = part;
while (p->parentPart())
p = p->parentPart();
return retrieve(p);
@@ -638,7 +638,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
break;
}
} else if (!part) {
- // not a KHTMLPart
+ // not a TDEHTMLPart
TQString rvalue;
KParts::LiveConnectExtension::Type rtype;
unsigned long robjid;
@@ -948,11 +948,11 @@ Value Window::get(ExecState *exec, const Identifier &p) const
case Onchange:
return getListener(exec,DOM::EventImpl::CHANGE_EVENT);
case Onclick:
- return getListener(exec,DOM::EventImpl::KHTML_ECMA_CLICK_EVENT);
+ return getListener(exec,DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT);
case Ondblclick:
- return getListener(exec,DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT);
+ return getListener(exec,DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT);
case Ondragdrop:
- return getListener(exec,DOM::EventImpl::KHTML_DRAGDROP_EVENT);
+ return getListener(exec,DOM::EventImpl::TDEHTML_DRAGDROP_EVENT);
case Onerror:
return getListener(exec,DOM::EventImpl::ERROR_EVENT);
case Onfocus:
@@ -976,7 +976,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
case Onmouseup:
return getListener(exec,DOM::EventImpl::MOUSEUP_EVENT);
case Onmove:
- return getListener(exec,DOM::EventImpl::KHTML_MOVE_EVENT);
+ return getListener(exec,DOM::EventImpl::TDEHTML_MOVE_EVENT);
case Onreset:
return getListener(exec,DOM::EventImpl::RESET_EVENT);
case Onresize:
@@ -1085,12 +1085,12 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
default:
break;
}
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (part) {
switch( entry->value ) {
case Status: {
if (isSafeScript(exec) && part->settings()->windowStatusPolicy(part->url().host())
- == KHTMLSettings::KJSWindowStatusAllow) {
+ == TDEHTMLSettings::KJSWindowStatusAllow) {
String s = value.toString(exec);
part->setJSStatusBarText(s.value().qstring());
}
@@ -1098,7 +1098,7 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
}
case DefaultStatus: {
if (isSafeScript(exec) && part->settings()->windowStatusPolicy(part->url().host())
- == KHTMLSettings::KJSWindowStatusAllow) {
+ == TDEHTMLSettings::KJSWindowStatusAllow) {
String s = value.toString(exec);
part->setJSDefaultStatusBarText(s.value().qstring());
}
@@ -1118,15 +1118,15 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
return;
case Onclick:
if (isSafeScript(exec))
- setListener(exec,DOM::EventImpl::KHTML_ECMA_CLICK_EVENT,value);
+ setListener(exec,DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT,value);
return;
case Ondblclick:
if (isSafeScript(exec))
- setListener(exec,DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT,value);
+ setListener(exec,DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT,value);
return;
case Ondragdrop:
if (isSafeScript(exec))
- setListener(exec,DOM::EventImpl::KHTML_DRAGDROP_EVENT,value);
+ setListener(exec,DOM::EventImpl::TDEHTML_DRAGDROP_EVENT,value);
return;
case Onerror:
if (isSafeScript(exec))
@@ -1174,7 +1174,7 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
return;
case Onmove:
if (isSafeScript(exec))
- setListener(exec,DOM::EventImpl::KHTML_MOVE_EVENT,value);
+ setListener(exec,DOM::EventImpl::TDEHTML_MOVE_EVENT,value);
return;
case Onreset:
if (isSafeScript(exec))
@@ -1222,7 +1222,7 @@ bool Window::toBoolean(ExecState *) const
DOM::AbstractView Window::toAbstractView() const
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part)
return DOM::AbstractView();
return part->document().defaultView();
@@ -1240,9 +1240,9 @@ void Window::closeNow()
if (m_frame.isNull() || m_frame->m_part.isNull()) {
kdDebug(6070) << k_funcinfo << "part is deleted already" << endl;
} else {
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part) {
- kdDebug(6070) << "closeNow on non KHTML part" << endl;
+ kdDebug(6070) << "closeNow on non TDEHTML part" << endl;
} else {
//kdDebug(6070) << k_funcinfo << " -> closing window" << endl;
// We want to make sure that window.open won't find this part by name.
@@ -1288,9 +1288,9 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
if ( activePart == m_frame->m_part ) // Not calling from another frame, no problem.
return true;
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part)
- return true; // not a KHTMLPart
+ return true; // not a TDEHTMLPart
if ( part->document().isNull() )
return true; // allow to access a window that was just created (e.g. with window.open("about:blank"))
@@ -1301,11 +1301,11 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
return false;
}
- KHTMLPart *activeKHTMLPart = ::tqqt_cast<KHTMLPart *>(activePart);
- if (!activeKHTMLPart)
- return true; // not a KHTMLPart
+ TDEHTMLPart *activeTDEHTMLPart = ::tqqt_cast<TDEHTMLPart *>(activePart);
+ if (!activeTDEHTMLPart)
+ return true; // not a TDEHTMLPart
- DOM::HTMLDocument actDocument = activeKHTMLPart->htmlDocument();
+ DOM::HTMLDocument actDocument = activeTDEHTMLPart->htmlDocument();
if ( actDocument.isNull() ) {
kdDebug(6070) << "Window::isSafeScript: active part has no document!" << endl;
return false;
@@ -1327,7 +1327,7 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
void Window::setListener(ExecState *exec, int eventId, Value func)
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part || !isSafeScript(exec))
return;
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(part->htmlDocument().handle());
@@ -1339,7 +1339,7 @@ void Window::setListener(ExecState *exec, int eventId, Value func)
Value Window::getListener(ExecState *exec, int eventId) const
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part || !isSafeScript(exec))
return Undefined();
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(part->htmlDocument().handle());
@@ -1357,7 +1357,7 @@ Value Window::getListener(ExecState *exec, int eventId) const
JSEventListener *Window::getJSEventListener(const Value& val, bool html)
{
// This function is so hot that it's worth coding it directly with imps.
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part || val.type() != ObjectType)
return 0;
@@ -1433,8 +1433,8 @@ void Window::setCurrentEvent( DOM::Event *evt )
void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory)
{
Window* active = Window::retrieveActive(exec);
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
- KHTMLPart *active_part = ::tqqt_cast<KHTMLPart *>(active->part());
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *active_part = ::tqqt_cast<TDEHTMLPart *>(active->part());
// Complete the URL using the "active part" (running interpreter)
if (active_part && part) {
if (url[0] == TQChar('#')) {
@@ -1470,7 +1470,7 @@ void Window::delayedGoHistory( int steps )
void Window::goHistory( int steps )
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if(!part)
// TODO history readonlypart
return;
@@ -1488,7 +1488,7 @@ void Window::goHistory( int steps )
void KJS::Window::resizeTo(TQWidget* tl, int width, int height)
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if(!part)
// TODO resizeTo readonlypart
return;
@@ -1531,10 +1531,10 @@ void KJS::Window::resizeTo(TQWidget* tl, int width, int height)
Value Window::openWindow(ExecState *exec, const List& args)
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part)
return Undefined();
- KHTMLView *widget = part->view();
+ TDEHTMLView *widget = part->view();
Value v = args[0];
TQString str;
if (v.isValid() && !v.isA(UndefinedType))
@@ -1544,7 +1544,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
KURL url;
if (!str.isEmpty())
{
- KHTMLPart* p = ::tqqt_cast<KHTMLPart *>(Window::retrieveActive(exec)->m_frame->m_part);
+ TDEHTMLPart* p = ::tqqt_cast<TDEHTMLPart *>(Window::retrieveActive(exec)->m_frame->m_part);
if ( p )
url = p->htmlDocument().completeURL(str).string();
if ( !p ||
@@ -1552,9 +1552,9 @@ Value Window::openWindow(ExecState *exec, const List& args)
return Undefined();
}
- KHTMLSettings::KJSWindowOpenPolicy policy =
+ TDEHTMLSettings::KJSWindowOpenPolicy policy =
part->settings()->windowOpenPolicy(part->url().host());
- if ( policy == KHTMLSettings::KJSWindowOpenAsk ) {
+ if ( policy == TDEHTMLSettings::KJSWindowOpenAsk ) {
emit part->browserExtension()->requestFocus(part);
TQString caption;
if (!part->url().host().isEmpty())
@@ -1568,12 +1568,12 @@ Value Window::openWindow(ExecState *exec, const List& args)
i18n( "<qt>This site is requesting to open<p>%1</p>in a new browser window via JavaScript.<br />"
"Do you want to allow this?</qt>").arg(KStringHandler::csqueeze(url.htmlURL(), 100)),
caption, i18n("Allow"), i18n("Do Not Allow") ) == KMessageBox::Yes )
- policy = KHTMLSettings::KJSWindowOpenAllow;
- } else if ( policy == KHTMLSettings::KJSWindowOpenSmart )
+ policy = TDEHTMLSettings::KJSWindowOpenAllow;
+ } else if ( policy == TDEHTMLSettings::KJSWindowOpenSmart )
{
// window.open disabled unless from a key/mouse event
if (static_cast<ScriptInterpreter *>(exec->interpreter())->isWindowOpenAllowed())
- policy = KHTMLSettings::KJSWindowOpenAllow;
+ policy = TDEHTMLSettings::KJSWindowOpenAllow;
}
TQString frameName = args.size() > 1 ? args[1].toString(exec).qstring() : TQString("_blank");
@@ -1587,7 +1587,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
features = features.mid(1, features.length()-2);
}
- if ( policy != KHTMLSettings::KJSWindowOpenAllow ) {
+ if ( policy != TDEHTMLSettings::KJSWindowOpenAllow ) {
if ( url.isEmpty() )
part->setSuppressedPopupIndicator(true, 0);
else {
@@ -1602,8 +1602,8 @@ Value Window::openWindow(ExecState *exec, const List& args)
Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features)
{
- KHTMLPart *p = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
- KHTMLView *widget = p->view();
+ TDEHTMLPart *p = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part);
+ TDEHTMLView *widget = p->view();
KParts::WindowArgs winargs;
// scan feature argument
@@ -1703,8 +1703,8 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
// request window (new or existing if framename is set)
KParts::ReadOnlyPart *newPart = 0L;
emit p->browserExtension()->createNewWindow(KURL(), uargs,winargs,newPart);
- if (newPart && ::tqqt_cast<KHTMLPart*>(newPart)) {
- KHTMLPart *tdehtmlpart = static_cast<KHTMLPart*>(newPart);
+ if (newPart && ::tqqt_cast<TDEHTMLPart*>(newPart)) {
+ TDEHTMLPart *tdehtmlpart = static_cast<TDEHTMLPart*>(newPart);
//tqDebug("opener set to %p (this Window's part) in new Window %p (this Window=%p)",part,win,window);
tdehtmlpart->setOpener(p);
tdehtmlpart->setOpenedByJS(true);
@@ -1735,7 +1735,7 @@ void Window::forgetSuppressedWindows()
void Window::showSuppressedWindows()
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>( m_frame->m_part );
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>( m_frame->m_part );
KJS::Interpreter *interpreter = part->jScript()->interpreter();
ExecState *exec = interpreter->globalExec();
@@ -1760,11 +1760,11 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
Window *window = static_cast<Window *>(thisObj.imp());
TQString str, str2;
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(window->m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(window->m_frame->m_part);
if (!part)
return Undefined();
- KHTMLView *widget = part->view();
+ TDEHTMLView *widget = part->view();
Value v = args[0];
UString s;
if (v.isValid() && !v.isA(UndefinedType)) {
@@ -1894,9 +1894,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
window->goURL(exec, args[0].toString(exec).qstring(), false /*don't lock history*/);
return Undefined();
case Window::Focus: {
- KHTMLSettings::KJSWindowFocusPolicy policy =
+ TDEHTMLSettings::KJSWindowFocusPolicy policy =
part->settings()->windowFocusPolicy(part->url().host());
- if(policy == KHTMLSettings::KJSWindowFocusAllow && widget) {
+ if(policy == TDEHTMLSettings::KJSWindowFocusAllow && widget) {
widget->topLevelWidget()->raise();
KWin::deIconifyWindow( widget->topLevelWidget()->winId() );
widget->setActiveWindow();
@@ -1944,9 +1944,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
widget->setContentsPos(args[0].toInt32(exec), args[1].toInt32(exec));
return Undefined();
case Window::MoveBy: {
- KHTMLSettings::KJSWindowMovePolicy policy =
+ TDEHTMLSettings::KJSWindowMovePolicy policy =
part->settings()->windowMovePolicy(part->url().host());
- if(policy == KHTMLSettings::KJSWindowMoveAllow && args.size() == 2 && widget)
+ if(policy == TDEHTMLSettings::KJSWindowMoveAllow && args.size() == 2 && widget)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
@@ -1964,9 +1964,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
return Undefined();
}
case Window::MoveTo: {
- KHTMLSettings::KJSWindowMovePolicy policy =
+ TDEHTMLSettings::KJSWindowMovePolicy policy =
part->settings()->windowMovePolicy(part->url().host());
- if(policy == KHTMLSettings::KJSWindowMoveAllow && args.size() == 2 && widget)
+ if(policy == TDEHTMLSettings::KJSWindowMoveAllow && args.size() == 2 && widget)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
@@ -1984,9 +1984,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
return Undefined();
}
case Window::ResizeBy: {
- KHTMLSettings::KJSWindowResizePolicy policy =
+ TDEHTMLSettings::KJSWindowResizePolicy policy =
part->settings()->windowResizePolicy(part->url().host());
- if(policy == KHTMLSettings::KJSWindowResizeAllow
+ if(policy == TDEHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
TQWidget * tl = widget->topLevelWidget();
@@ -1998,9 +1998,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
return Undefined();
}
case Window::ResizeTo: {
- KHTMLSettings::KJSWindowResizePolicy policy =
+ TDEHTMLSettings::KJSWindowResizePolicy policy =
part->settings()->windowResizePolicy(part->url().host());
- if(policy == KHTMLSettings::KJSWindowResizeAllow
+ if(policy == TDEHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
TQWidget * tl = widget->topLevelWidget();
@@ -2114,7 +2114,7 @@ ScheduledAction::ScheduledAction(TQString _code, DateTimeMS _nextTime, int _inte
bool ScheduledAction::execute(Window *window)
{
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(window->m_frame->m_part);
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(window->m_frame->m_part);
if (!part || !part->jScriptEnabled())
return false;
ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(part->jScript()->interpreter());
@@ -2432,7 +2432,7 @@ Value FrameArray::get(ExecState *exec, const Identifier &p) const
if (node) {
if (node->id() == ID_FRAME || node->id() == ID_IFRAME) {
//Return the Window object.
- KHTMLPart* part = static_cast<DOM::HTMLFrameElementImpl*>(node)->contentPart();
+ TDEHTMLPart* part = static_cast<DOM::HTMLFrameElementImpl*>(node)->contentPart();
if (part)
return Value(Window::retrieveWindow(part));
else
@@ -2590,7 +2590,7 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
TQString str = v.toString(exec).qstring();
switch (entry->value) {
case Href: {
- KHTMLPart* p =::tqqt_cast<KHTMLPart*>(Window::retrieveActive(exec)->part());
+ TDEHTMLPart* p =::tqqt_cast<TDEHTMLPart*>(Window::retrieveActive(exec)->part());
if ( p )
url = p->htmlDocument().completeURL( str ).string();
else
@@ -2681,7 +2681,7 @@ Value LocationFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
id == Location::Replace);
break;
case Location::Reload: {
- KHTMLPart *tdehtmlpart = ::tqqt_cast<KHTMLPart *>(part);
+ TDEHTMLPart *tdehtmlpart = ::tqqt_cast<TDEHTMLPart *>(part);
if (tdehtmlpart)
tdehtmlpart->scheduleRedirection(-1, part->url().url(), true/*lock history*/);
else
@@ -2714,11 +2714,11 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
KJS_CHECK_THIS( External, thisObj );
External *external = static_cast<External *>(thisObj.imp());
- KHTMLPart *part = external->part;
+ TDEHTMLPart *part = external->part;
if (!part)
return Undefined();
- KHTMLView *widget = part->view();
+ TDEHTMLView *widget = part->view();
switch (id) {
case External::AddFavorite:
diff --git a/tdehtml/ecma/kjs_window.h b/tdehtml/ecma/kjs_window.h
index b9142f983..c30871692 100644
--- a/tdehtml/ecma/kjs_window.h
+++ b/tdehtml/ecma/kjs_window.h
@@ -32,8 +32,8 @@
#include "kjs_views.h"
class TQTimer;
-class KHTMLView;
-class KHTMLPart;
+class TDEHTMLView;
+class TDEHTMLPart;
namespace KParts {
class ReadOnlyPart;
@@ -64,13 +64,13 @@ namespace KJS {
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
Value getValueProperty(ExecState *exec, int token) const;
private:
- KHTMLView *view;
+ TDEHTMLView *view;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
};
class KDE_EXPORT Window : public ObjectImp {
- friend TQGuardedPtr<KHTMLPart> getInstance();
+ friend TQGuardedPtr<TDEHTMLPart> getInstance();
friend class Location;
friend class WindowFunc;
friend class WindowQObject;
@@ -293,14 +293,14 @@ namespace KJS {
class Konqueror : public ObjectImp {
friend class KonquerorFunc;
public:
- Konqueror(KHTMLPart *p) : part(p) { }
+ Konqueror(TDEHTMLPart *p) : part(p) { }
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
virtual bool hasProperty(ExecState *exec, const Identifier &p) const;
virtual UString toString(ExecState *exec) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
private:
- KHTMLPart *part;
+ TDEHTMLPart *part;
};
#endif
diff --git a/tdehtml/ecma/testecma.cpp b/tdehtml/ecma/testecma.cpp
index 44cd7ecb0..3bd4bb88d 100644
--- a/tdehtml/ecma/testecma.cpp
+++ b/tdehtml/ecma/testecma.cpp
@@ -19,7 +19,7 @@
/**
* An interactive interpreter to test the ECMA Script language bindings
- * for the DOM of KHTML.
+ * for the DOM of TDEHTML.
* The 'document' property is preset to an instance of Document and serves
* as an entrypoint.
*
diff --git a/tdehtml/ecma/xmlhttprequest.cpp b/tdehtml/ecma/xmlhttprequest.cpp
index bfaa91231..d95fe5e58 100644
--- a/tdehtml/ecma/xmlhttprequest.cpp
+++ b/tdehtml/ecma/xmlhttprequest.cpp
@@ -725,7 +725,7 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L
}
TQString method = args[0].toString(exec).qstring();
- KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(Window::retrieveActive(exec)->part());
+ TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(Window::retrieveActive(exec)->part());
if (!part)
return Undefined();
KURL url = KURL(part->document().completeURL(args[1].toString(exec).qstring()).string());