[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:51:31 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b90e834bfb9ebe6656134ca2561e9d1e4457b003
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 6 16:40:26 2001 +0000
A number of changes that help to get javascript up and running:
- Modified a number of Makefiles to include ecma directory
- Tweaked a bunch of kjs files that used 'id' as a local variable
name. Now that these files are included in .mm's there's a name
conflict with the Objective-C type. In each case, the 'id' local
variable name was changed to '_id'.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/khtml/Makefile.in b/WebCore/khtml/Makefile.in
index de8841e..d40b65e 100644
--- a/WebCore/khtml/Makefile.in
+++ b/WebCore/khtml/Makefile.in
@@ -41,6 +41,7 @@ CLEAN_FILES = $(OBJECTS) \
# Set flags for this directory
CXXFLAGS = $(BASECXXFLAGS) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/dcop \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
diff --git a/WebCore/khtml/css/Makefile.in b/WebCore/khtml/css/Makefile.in
index b19e876..236ced0 100644
--- a/WebCore/khtml/css/Makefile.in
+++ b/WebCore/khtml/css/Makefile.in
@@ -62,6 +62,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/dcop \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
diff --git a/WebCore/khtml/dom/Makefile.in b/WebCore/khtml/dom/Makefile.in
index 70761c1..3e98cfb 100644
--- a/WebCore/khtml/dom/Makefile.in
+++ b/WebCore/khtml/dom/Makefile.in
@@ -41,6 +41,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
diff --git a/WebCore/khtml/dom/html_document.cpp b/WebCore/khtml/dom/html_document.cpp
index 5f9f80f..ec7bff6 100644
--- a/WebCore/khtml/dom/html_document.cpp
+++ b/WebCore/khtml/dom/html_document.cpp
@@ -41,7 +41,6 @@
#include "khtmlview.h"
using namespace DOM;
-
HTMLDocument::HTMLDocument() : Document(false) // create the impl here
{
impl = new HTMLDocumentImpl();
@@ -179,6 +178,9 @@ HTMLCollection HTMLDocument::all() const
DOMString HTMLDocument::cookie() const
{
+#ifdef _KWQ_
+ fprintf(stderr, "ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
+#else
QCString replyType;
QByteArray params, reply;
QDataStream stream(params, IO_WriteOnly);
@@ -199,10 +201,14 @@ DOMString HTMLDocument::cookie() const
QString result;
stream2 >> result;
return DOMString(result);
+#endif
}
void HTMLDocument::setCookie( const DOMString & value )
{
+#ifdef _KWQ_
+ fprintf(stderr, "ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
+#else
long windowId = view()->winId();
QByteArray params;
QDataStream stream(params, IO_WriteOnly);
@@ -215,6 +221,7 @@ void HTMLDocument::setCookie( const DOMString & value )
{
kdWarning(6010) << "Can't communicate with cookiejar!" << endl;
}
+#endif
}
void HTMLDocument::open( )
diff --git a/WebCore/khtml/ecma/Makefile.in b/WebCore/khtml/ecma/Makefile.in
index 6242626..21974c0 100644
--- a/WebCore/khtml/ecma/Makefile.in
+++ b/WebCore/khtml/ecma/Makefile.in
@@ -41,6 +41,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
diff --git a/WebCore/khtml/ecma/kjs_css.cpp b/WebCore/khtml/ecma/kjs_css.cpp
index 5eae7cb..32c74a5 100644
--- a/WebCore/khtml/ecma/kjs_css.cpp
+++ b/WebCore/khtml/ecma/kjs_css.cpp
@@ -150,7 +150,7 @@ Completion DOMCSSStyleDeclarationFunc::tryExecute(const List &args)
String str = args[0].toString();
DOM::DOMString s = str.value().string();
- switch (id) {
+ switch (_id) {
case GetPropertyValue:
result = getString(styleDecl.getPropertyValue(s));
break;
@@ -294,7 +294,7 @@ Completion DOMStyleSheetListFunc::tryExecute(const List &args)
{
KJSO result;
- if (id == Item)
+ if (_id == Item)
result = getDOMStyleSheet(styleSheetList.item(args[0].toNumber().intValue()));
return Completion(ReturnValue, result);
}
@@ -357,7 +357,7 @@ Completion DOMMediaListFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case Item:
result = getString(mediaList.item(args[0].toNumber().intValue()));
break;
@@ -408,7 +408,7 @@ Completion DOMCSSStyleSheetFunc::tryExecute(const List &args)
String str = args[0].toString();
DOM::DOMString s = str.value().string();
- switch (id) {
+ switch (_id) {
case InsertRule:
result = Number(styleSheet.insertRule(args[0].toString().value().string(),(long unsigned int)args[1].toNumber().intValue()));
break;
@@ -452,7 +452,7 @@ Completion DOMCSSRuleListFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case Item:
result = getDOMCSSRule(cssRuleList.item(args[0].toNumber().intValue()));
break;
@@ -586,9 +586,9 @@ Completion DOMCSSRuleFunc::tryExecute(const List &args)
if (cssRule.type() == DOM::CSSRule::MEDIA_RULE) {
DOM::CSSMediaRule rule = static_cast<DOM::CSSMediaRule>(cssRule);
- if (id == InsertRule)
+ if (_id == InsertRule)
result = Number(rule.insertRule(args[0].toString().value().string(),args[1].toNumber().intValue()));
- else if (id == DeleteRule)
+ else if (_id == DeleteRule)
rule.deleteRule(args[0].toNumber().intValue());
}
@@ -773,7 +773,7 @@ Completion DOMCSSPrimitiveValueFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case SetFloatValue:
val.setFloatValue(args[0].toNumber().intValue(),args[1].toNumber().value());
result = Undefined();
@@ -879,7 +879,7 @@ Completion DOMCSSValueListFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case Item:
result = getDOMCSSValue(valueList.item(args[0].toNumber().intValue()));
break;
diff --git a/WebCore/khtml/ecma/kjs_css.h b/WebCore/khtml/ecma/kjs_css.h
index 4041ec7..b772fea 100644
--- a/WebCore/khtml/ecma/kjs_css.h
+++ b/WebCore/khtml/ecma/kjs_css.h
@@ -46,13 +46,13 @@ namespace KJS {
class DOMCSSStyleDeclarationFunc : public DOMFunction {
friend class DOMNode;
public:
- DOMCSSStyleDeclarationFunc(DOM::CSSStyleDeclaration s, int i) : styleDecl(s), id(i) { }
+ DOMCSSStyleDeclarationFunc(DOM::CSSStyleDeclaration s, int i) : styleDecl(s), _id(i) { }
Completion tryExecute(const List &);
enum { GetPropertyValue, GetPropertyCSSValue, RemoveProperty, GetPropertyPriority,
SetProperty, Item };
private:
DOM::CSSStyleDeclaration styleDecl;
- int id;
+ int _id;
};
KJSO getDOMCSSStyleDeclaration(DOM::CSSStyleDeclaration n);
@@ -90,12 +90,12 @@ namespace KJS {
class DOMStyleSheetListFunc : public DOMFunction {
friend class DOMStyleSheetList;
public:
- DOMStyleSheetListFunc(DOM::StyleSheetList ssl, int i) : styleSheetList(ssl), id(i) { }
+ DOMStyleSheetListFunc(DOM::StyleSheetList ssl, int i) : styleSheetList(ssl), _id(i) { }
Completion tryExecute(const List &);
enum { Item };
private:
DOM::StyleSheetList styleSheetList;
- int id;
+ int _id;
};
class DOMMediaList : public DOMObject {
@@ -116,12 +116,12 @@ namespace KJS {
class DOMMediaListFunc : public DOMFunction {
friend class DOMMediaList;
public:
- DOMMediaListFunc(DOM::MediaList ml, int i) : mediaList(ml), id(i) { }
+ DOMMediaListFunc(DOM::MediaList ml, int i) : mediaList(ml), _id(i) { }
Completion tryExecute(const List &);
enum { Item, DeleteMedium, AppendMedium };
private:
DOM::MediaList mediaList;
- int id;
+ int _id;
};
class DOMCSSStyleSheet : public DOMStyleSheet {
@@ -137,12 +137,12 @@ namespace KJS {
class DOMCSSStyleSheetFunc : public DOMFunction {
friend class DOMNode;
public:
- DOMCSSStyleSheetFunc(DOM::CSSStyleSheet ss, int i) : styleSheet(ss), id(i) { }
+ DOMCSSStyleSheetFunc(DOM::CSSStyleSheet ss, int i) : styleSheet(ss), _id(i) { }
Completion tryExecute(const List &);
enum { InsertRule, DeleteRule };
private:
DOM::CSSStyleSheet styleSheet;
- int id;
+ int _id;
};
class DOMCSSRuleList : public DOMObject {
@@ -159,12 +159,12 @@ namespace KJS {
class DOMCSSRuleListFunc : public DOMFunction {
public:
- DOMCSSRuleListFunc(DOM::CSSRuleList rl, int i) : cssRuleList(rl), id(i) { }
+ DOMCSSRuleListFunc(DOM::CSSRuleList rl, int i) : cssRuleList(rl), _id(i) { }
Completion tryExecute(const List &);
enum { Item };
private:
DOM::CSSRuleList cssRuleList;
- int id;
+ int _id;
};
KJSO getDOMCSSRuleList(DOM::CSSRuleList rl);
@@ -184,12 +184,12 @@ namespace KJS {
class DOMCSSRuleFunc : public DOMFunction {
public:
- DOMCSSRuleFunc(DOM::CSSRule r, int i) : cssRule(r), id(i) { }
+ DOMCSSRuleFunc(DOM::CSSRule r, int i) : cssRule(r), _id(i) { }
Completion tryExecute(const List &);
enum { Item, InsertRule, DeleteRule };
private:
DOM::CSSRule cssRule;
- int id;
+ int _id;
};
KJSO getDOMCSSRule(DOM::CSSRule r);
@@ -249,13 +249,13 @@ namespace KJS {
class DOMCSSPrimitiveValueFunc : public DOMFunction {
friend class DOMNode;
public:
- DOMCSSPrimitiveValueFunc(DOM::CSSPrimitiveValue v, int i) : val(v), id(i) { }
+ DOMCSSPrimitiveValueFunc(DOM::CSSPrimitiveValue v, int i) : val(v), _id(i) { }
Completion tryExecute(const List &);
enum { SetFloatValue, GetFloatValue, SetStringValue, GetStringValue,
GetCounterValue, GetRectValue, GetRGBColorValue };
private:
DOM::CSSPrimitiveValue val;
- int id;
+ int _id;
};
// Prototype object CSSPrimitiveValue
@@ -281,12 +281,12 @@ namespace KJS {
class DOMCSSValueListFunc : public DOMFunction {
public:
- DOMCSSValueListFunc(DOM::CSSValueList vl, int i) : valueList(vl), id(i) { }
+ DOMCSSValueListFunc(DOM::CSSValueList vl, int i) : valueList(vl), _id(i) { }
Completion tryExecute(const List &);
enum { Item };
private:
DOM::CSSValueList valueList;
- int id;
+ int _id;
};
class DOMRGBColor : public DOMObject {
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index bfcdbde..045e03c 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -324,7 +324,7 @@ Completion DOMNodeFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case HasChildNodes:
result = Boolean(node.hasChildNodes());
break;
@@ -411,7 +411,7 @@ Completion DOMNodeListFunc::tryExecute(const List &args)
{
KJSO result;
- if (id == Item)
+ if (_id == Item)
result = getDOMNode(list.item(args[0].toNumber().intValue()));
return Completion(ReturnValue, result);
}
@@ -528,7 +528,7 @@ KJSO DOMDocument::tryGet(const UString &p) const
}
DOMDocFunction::DOMDocFunction(DOM::Document d, int i)
- : doc(d), id(i)
+ : doc(d), _id(i)
{
}
@@ -540,7 +540,7 @@ Completion DOMDocFunction::tryExecute(const List &args)
String str = args[0].toString();
DOM::DOMString s = str.value().string();
- switch(id) {
+ switch(_id) {
case CreateElement:
result = getDOMNode(doc.createElement(s));
break;
@@ -670,7 +670,7 @@ KJSO DOMElement::tryGet(const UString &p) const
DOMElementFunction::DOMElementFunction(DOM::Element e, int i)
- : element(e), id(i)
+ : element(e), _id(i)
{
}
@@ -678,7 +678,7 @@ Completion DOMElementFunction::tryExecute(const List &args)
{
KJSO result;
- switch(id) {
+ switch(_id) {
case GetAttribute:
result = String(element.getAttribute(args[0].toString().value().string()));
break;
@@ -746,7 +746,7 @@ KJSO DOMDOMImplementation::tryGet(const UString &p) const
}
DOMDOMImplementationFunction::DOMDOMImplementationFunction(DOM::DOMImplementation impl, int i)
- : implementation(impl), id(i)
+ : implementation(impl), _id(i)
{
}
@@ -754,7 +754,7 @@ Completion DOMDOMImplementationFunction::tryExecute(const List &args)
{
KJSO result;
- switch(id) {
+ switch(_id) {
case HasFeature:
result = Boolean(implementation.hasFeature(args[0].toString().value().string(),args[1].toString().value().string()));
break;
@@ -836,7 +836,7 @@ KJSO DOMNamedNodeMap::tryGet(const UString &p) const
}
DOMNamedNodeMapFunction::DOMNamedNodeMapFunction(DOM::NamedNodeMap m, int i)
- : map(m), id(i)
+ : map(m), _id(i)
{
}
@@ -844,7 +844,7 @@ Completion DOMNamedNodeMapFunction::tryExecute(const List &args)
{
KJSO result;
- switch(id) {
+ switch(_id) {
case GetNamedItem:
result = getDOMNode(map.getNamedItem(args[0].toString().value().string()));
break;
diff --git a/WebCore/khtml/ecma/kjs_dom.h b/WebCore/khtml/ecma/kjs_dom.h
index d5820f5..ea42e7a 100644
--- a/WebCore/khtml/ecma/kjs_dom.h
+++ b/WebCore/khtml/ecma/kjs_dom.h
@@ -58,14 +58,14 @@ namespace KJS {
class DOMNodeFunc : public DOMFunction {
friend class DOMNode;
public:
- DOMNodeFunc(DOM::Node n, int i) : node(n), id(i) { }
+ DOMNodeFunc(DOM::Node n, int i) : node(n), _id(i) { }
Completion tryExecute(const List &);
enum { InsertBefore, ReplaceChild, RemoveChild, AppendChild,
HasChildNodes, CloneNode, AddEventListener, RemoveEventListener,
DispatchEvent };
private:
DOM::Node node;
- int id;
+ int _id;
};
class DOMNodeList : public DOMObject {
@@ -84,12 +84,12 @@ namespace KJS {
class DOMNodeListFunc : public DOMFunction {
friend class DOMNodeList;
public:
- DOMNodeListFunc(DOM::NodeList l, int i) : list(l), id(i) { }
+ DOMNodeListFunc(DOM::NodeList l, int i) : list(l), _id(i) { }
Completion tryExecute(const List &);
enum { Item };
private:
DOM::NodeList list;
- int id;
+ int _id;
};
class DOMDocument : public DOMNode {
@@ -112,7 +112,7 @@ namespace KJS {
CreateRange, CreateNodeIterator, CreateTreeWalker, CreateEvent, GetOverrideStyle };
private:
DOM::Document doc;
- int id;
+ int _id;
};
class DOMAttr : public DOMNode {
@@ -144,7 +144,7 @@ namespace KJS {
Normalize };
private:
DOM::Element element;
- int id;
+ int _id;
};
class DOMDOMImplementation : public DOMObject {
@@ -167,7 +167,7 @@ namespace KJS {
enum { HasFeature, CreateDocumentType, CreateDocument, CreateCSSStyleSheet };
private:
DOM::DOMImplementation implementation;
- int id;
+ int _id;
};
class DOMDocumentType : public DOMNode {
@@ -200,7 +200,7 @@ namespace KJS {
GetNamedItemNS, SetNamedItemNS, RemoveNamedItemNS };
private:
DOM::NamedNodeMap map;
- int id;
+ int _id;
};
class DOMProcessingInstruction : public DOMNode {
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 50ee5b3..04d77dd 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -798,6 +798,7 @@ bool Window::isSafeScript() const
KHTMLPart *act = (KHTMLPart*)KJS::Global::current().extra();
if (!act)
kdDebug(6070) << "Window::isSafeScript: KJS::Global::current().extra() is 0L!" << endl;
+
return act && originCheck(m_part->url(), act->url());
}
diff --git a/WebCore/khtml/ecma/testecma.cpp b/WebCore/khtml/ecma/testecma.cpp
index 43b0b2a..dd3be39 100644
--- a/WebCore/khtml/ecma/testecma.cpp
+++ b/WebCore/khtml/ecma/testecma.cpp
@@ -31,6 +31,10 @@
* ---> foo
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <kjs/kjs.h>
#include <dom_doc.h>
@@ -46,8 +50,8 @@ int main(int, char **)
kjs.enableDebug();
DOM::Document doc;
- DOMDocument *dd = new DOMDocument(&doc);
- Global::current().put("document", KJSO(dd));
+ DOMDocument *dd = new DOMDocument(&doc);
+ Global::current().put("document", KJSO(dd));
printf("Entering interactive mode.\n"
"You may access the DOM via the 'document' property.\n"
diff --git a/WebCore/khtml/html/Makefile.in b/WebCore/khtml/html/Makefile.in
index 92da133..fe0a001 100644
--- a/WebCore/khtml/html/Makefile.in
+++ b/WebCore/khtml/html/Makefile.in
@@ -38,6 +38,7 @@ CLEAN_FILES = $(OBJECTS) \
# Set flags for this directory
CXXFLAGS = $(BASECXXFLAGS) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/dcop \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
diff --git a/WebCore/khtml/java/Makefile.in b/WebCore/khtml/java/Makefile.in
index eb718d7..af8bbc1 100644
--- a/WebCore/khtml/java/Makefile.in
+++ b/WebCore/khtml/java/Makefile.in
@@ -49,6 +49,7 @@ CXXFLAGS = $(BASECXXFLAGS) \
-DNEED_BOGUS_TEXTSTREAMS \
-DNEED_BOGUS_X_DEFINES \
-I$(TOPSRCDIR)/WebCore/src/kwq \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
-I$(TOPSRCDIR)/WebCore/src/kwq/kdecore \
diff --git a/WebCore/khtml/misc/Makefile.in b/WebCore/khtml/misc/Makefile.in
index 4ba1adb..04f1714 100644
--- a/WebCore/khtml/misc/Makefile.in
+++ b/WebCore/khtml/misc/Makefile.in
@@ -56,6 +56,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
diff --git a/WebCore/khtml/rendering/Makefile.in b/WebCore/khtml/rendering/Makefile.in
index 622f9e0..a815ff6 100644
--- a/WebCore/khtml/rendering/Makefile.in
+++ b/WebCore/khtml/rendering/Makefile.in
@@ -38,7 +38,8 @@ CLEAN_FILES = $(OBJECTS) \
# Set flags for this directory
CXXFLAGS = $(BASECXXFLAGS) \
- -DNEED_BOGUS_X_DEFINES \
+ -DNEED_BOGUS_X_DEFINES \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
diff --git a/WebCore/khtml/xml/Makefile.in b/WebCore/khtml/xml/Makefile.in
index ddfc9db..9ce71ed 100644
--- a/WebCore/khtml/xml/Makefile.in
+++ b/WebCore/khtml/xml/Makefile.in
@@ -59,6 +59,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-DNEED_BOGUS_TEXTSTREAMS \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/kdecore \
diff --git a/WebCore/kwq/KWQGuardedPtr.h b/WebCore/kwq/KWQGuardedPtr.h
index 2f58885..2eaacf3 100644
--- a/WebCore/kwq/KWQGuardedPtr.h
+++ b/WebCore/kwq/KWQGuardedPtr.h
@@ -32,6 +32,19 @@
#include "qobject.h"
+// class QGuardedPtrPrivate ====================================================
+
+class QGuardedPtrPrivate : public QObject, public QShared {
+public:
+ QGuardedPtrPrivate(QObject *o);
+ ~QGuardedPtrPrivate();
+
+ QObject *object() const;
+
+private:
+ QObject *p;
+};
+
// class QGuardedPtr ===========================================================
template <class T> class QGuardedPtr : public QObject {
@@ -44,25 +57,70 @@ public:
// constructors, copy constructors, and destructors ------------------------
- QGuardedPtr() {}
- QGuardedPtr(T *o) {}
- QGuardedPtr(const QGuardedPtr<T> &) {}
-
- ~QGuardedPtr() {}
+ QGuardedPtr() {
+ d = new QGuardedPtrPrivate(0L);
+ }
+ QGuardedPtr(T *o) {
+ d = new QGuardedPtrPrivate(o);
+ }
+
+ QGuardedPtr(const QGuardedPtr<T> &p) {
+ d = p.d;
+ ref();
+ }
+
+ ~QGuardedPtr() {
+ deref();
+ }
// member functions --------------------------------------------------------
- bool isNull() const {}
+ bool isNull() const {
+ return !d->object();
+ }
// operators ---------------------------------------------------------------
- QGuardedPtr &operator=(const QGuardedPtr &) {}
- operator T *() const {}
- T *operator->() const {}
+ QGuardedPtr &operator=(const QGuardedPtr &p) {
+ if (d != p.d) {
+ deref();
+ d = p.d;
+ ref();
+ }
+ return *this;
+ }
+
+ operator T *() const {
+ return (T*)d->object();
+ }
+
+ T *operator->() const {
+ return (T*)d->object();
+ }
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+private:
+ QGuardedPtrPrivate *d;
+
+ void ref()
+ {
+ d->ref();
+ }
+
+ void deref()
+ {
+ if (d->deref())
+ delete d;
+ }
+
}; // class QGuardedPtr ========================================================
+
+inline QObject *QGuardedPtrPrivate::object() const
+{
+ return p;
+}
+
#endif
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 7b9b9f2..c5d7d5c 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -40,6 +40,9 @@
#include <xml/dom_docimpl.h>
#include <html/html_documentimpl.h>
#include <loader.h>
+#include <kjs.h>
+#include <kjs_dom.h>
+#include <dom_doc.h>
#include <KWQKHTMLPart.h>
@@ -108,6 +111,9 @@ public:
bool m_bFirstData:1;
bool m_haveEncoding:1;
bool m_haveCharset:1;
+
+ KJSProxy *m_jscript;
+ int m_runningScripts;
KHTMLPartPrivate(KHTMLPart *part)
{
@@ -125,6 +131,9 @@ public:
m_haveEncoding = false;
m_recv = [[KHTMLPartNotificationReceiver alloc] init];
m_recv->m_part = part;
+
+ m_jscript = 0L;
+ m_runningScripts = 0;
}
~KHTMLPartPrivate()
@@ -225,13 +234,16 @@ bool KHTMLPart::closeURL()
DOM::HTMLDocument KHTMLPart::htmlDocument() const
{
- _logNotYetImplemented();
+ 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
{
- _logNotYetImplemented();
+ return d->m_doc;
}
@@ -244,6 +256,7 @@ void KHTMLPart::setJScriptEnabled( bool enable )
bool KHTMLPart::jScriptEnabled() const
{
_logNotYetImplemented();
+ return TRUE;
}
@@ -256,25 +269,43 @@ void KHTMLPart::enableMetaRefresh( bool enable )
bool KHTMLPart::metaRefreshEnabled() const
{
_logNotYetImplemented();
+ return FALSE;
}
-
// DUBIOUS, rather than executing the script this document should be
// passed to the interpreter.
QVariant KHTMLPart::executeScript( const QString &script )
{
- _logNotYetImplemented();
+ return executeScript( DOM::Node(), script );
}
-
// DUBIOUS, rather than executing the script this document should be
// passed to the interpreter.
QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
{
- _logNotYetImplemented();
+ KJSProxy *proxy = jScript();
+
+ if (!proxy) {
+ return QVariant();
+ }
+
+ d->m_runningScripts++;
+ QVariant ret = proxy->evaluate( script.unicode(), script.length(), n );
+ d->m_runningScripts--;
+
+ // FIXME: implement
+ //if ( d->m_submitForm ) {
+ // submitFormAgain();
+ //}
+
+ if ( d->m_doc ) {
+ d->m_doc->updateRendering();
+ }
+
+ //kdDebug(6050) << "KHTMLPart::executeScript - done" << endl;
+ return ret;
}
-
void KHTMLPart::setJavaEnabled( bool enable )
{
_logNotYetImplemented();
@@ -284,6 +315,7 @@ void KHTMLPart::setJavaEnabled( bool enable )
bool KHTMLPart::javaEnabled() const
{
_logNotYetImplemented();
+ return FALSE;
}
@@ -654,7 +686,12 @@ const KHTMLSettings *KHTMLPart::settings() const
KJSProxy *KHTMLPart::jScript()
{
- _logNotYetImplemented();
+ if ( !d->m_jscript )
+ {
+ d->m_jscript = kjs_html_init(this);
+ }
+
+ return d->m_jscript;
}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 7b9b9f2..c5d7d5c 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -40,6 +40,9 @@
#include <xml/dom_docimpl.h>
#include <html/html_documentimpl.h>
#include <loader.h>
+#include <kjs.h>
+#include <kjs_dom.h>
+#include <dom_doc.h>
#include <KWQKHTMLPart.h>
@@ -108,6 +111,9 @@ public:
bool m_bFirstData:1;
bool m_haveEncoding:1;
bool m_haveCharset:1;
+
+ KJSProxy *m_jscript;
+ int m_runningScripts;
KHTMLPartPrivate(KHTMLPart *part)
{
@@ -125,6 +131,9 @@ public:
m_haveEncoding = false;
m_recv = [[KHTMLPartNotificationReceiver alloc] init];
m_recv->m_part = part;
+
+ m_jscript = 0L;
+ m_runningScripts = 0;
}
~KHTMLPartPrivate()
@@ -225,13 +234,16 @@ bool KHTMLPart::closeURL()
DOM::HTMLDocument KHTMLPart::htmlDocument() const
{
- _logNotYetImplemented();
+ 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
{
- _logNotYetImplemented();
+ return d->m_doc;
}
@@ -244,6 +256,7 @@ void KHTMLPart::setJScriptEnabled( bool enable )
bool KHTMLPart::jScriptEnabled() const
{
_logNotYetImplemented();
+ return TRUE;
}
@@ -256,25 +269,43 @@ void KHTMLPart::enableMetaRefresh( bool enable )
bool KHTMLPart::metaRefreshEnabled() const
{
_logNotYetImplemented();
+ return FALSE;
}
-
// DUBIOUS, rather than executing the script this document should be
// passed to the interpreter.
QVariant KHTMLPart::executeScript( const QString &script )
{
- _logNotYetImplemented();
+ return executeScript( DOM::Node(), script );
}
-
// DUBIOUS, rather than executing the script this document should be
// passed to the interpreter.
QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
{
- _logNotYetImplemented();
+ KJSProxy *proxy = jScript();
+
+ if (!proxy) {
+ return QVariant();
+ }
+
+ d->m_runningScripts++;
+ QVariant ret = proxy->evaluate( script.unicode(), script.length(), n );
+ d->m_runningScripts--;
+
+ // FIXME: implement
+ //if ( d->m_submitForm ) {
+ // submitFormAgain();
+ //}
+
+ if ( d->m_doc ) {
+ d->m_doc->updateRendering();
+ }
+
+ //kdDebug(6050) << "KHTMLPart::executeScript - done" << endl;
+ return ret;
}
-
void KHTMLPart::setJavaEnabled( bool enable )
{
_logNotYetImplemented();
@@ -284,6 +315,7 @@ void KHTMLPart::setJavaEnabled( bool enable )
bool KHTMLPart::javaEnabled() const
{
_logNotYetImplemented();
+ return FALSE;
}
@@ -654,7 +686,12 @@ const KHTMLSettings *KHTMLPart::settings() const
KJSProxy *KHTMLPart::jScript()
{
- _logNotYetImplemented();
+ if ( !d->m_jscript )
+ {
+ d->m_jscript = kjs_html_init(this);
+ }
+
+ return d->m_jscript;
}
diff --git a/WebCore/kwq/KWQKLocale.mm b/WebCore/kwq/KWQKLocale.mm
index 6547d9f..44cd5db 100644
--- a/WebCore/kwq/KWQKLocale.mm
+++ b/WebCore/kwq/KWQKLocale.mm
@@ -22,6 +22,7 @@
* (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 <qstring.h>
@@ -33,4 +34,9 @@ QString i18n(const char* text)
return QString (text);
}
+QString KLocale::language() const
+{
+ _logNotYetImplemented();
+ return QString();
+}
diff --git a/WebCore/kwq/KWQKProtocolManager.mm b/WebCore/kwq/KWQKProtocolManager.mm
index ce3df79..278d99f 100644
--- a/WebCore/kwq/KWQKProtocolManager.mm
+++ b/WebCore/kwq/KWQKProtocolManager.mm
@@ -23,6 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <kwqdebug.h>
+
#include <qstring.h>
#include <kprotocolmanager.h>
@@ -30,14 +32,19 @@
bool KProtocolManager::useProxy()
{
+ return FALSE;
}
QString KProtocolManager::httpProxy()
{
+ _logNotYetImplemented();
+ return QString();
}
QString KProtocolManager::userAgentForHost( const QString& )
{
+ _logNotYetImplemented();
+ return QString("intrigue-0.000001");
}
diff --git a/WebCore/kwq/KWQKStandardDirs.mm b/WebCore/kwq/KWQKStandardDirs.mm
index bf02f8e..76eeb11 100644
--- a/WebCore/kwq/KWQKStandardDirs.mm
+++ b/WebCore/kwq/KWQKStandardDirs.mm
@@ -37,3 +37,11 @@ QString locateLocal(const char *type, const QString &filename,
{
return "/symroots/appdata/"+filename;
}
+
+QString KStandardDirs::saveLocation(const char *, const QString &suffix = QString::null,
+ bool create = true) const
+{
+ _logNotYetImplemented();
+ return QString();
+}
+
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index 0165b3a..baa02d2 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -776,6 +776,7 @@ DocLoader::DocLoader(KHTMLPart* part)
m_showAnimations = true;
m_part = part;
+ Cache::init();
Cache::docloader->append( this );
}
diff --git a/WebCore/kwq/KWQKstddirs.mm b/WebCore/kwq/KWQKstddirs.mm
index bf02f8e..76eeb11 100644
--- a/WebCore/kwq/KWQKstddirs.mm
+++ b/WebCore/kwq/KWQKstddirs.mm
@@ -37,3 +37,11 @@ QString locateLocal(const char *type, const QString &filename,
{
return "/symroots/appdata/"+filename;
}
+
+QString KStandardDirs::saveLocation(const char *, const QString &suffix = QString::null,
+ bool create = true) const
+{
+ _logNotYetImplemented();
+ return QString();
+}
+
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 0165b3a..baa02d2 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -776,6 +776,7 @@ DocLoader::DocLoader(KHTMLPart* part)
m_showAnimations = true;
m_part = part;
+ Cache::init();
Cache::docloader->append( this );
}
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 0165b3a..baa02d2 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -776,6 +776,7 @@ DocLoader::DocLoader(KHTMLPart* part)
m_showAnimations = true;
m_part = part;
+ Cache::init();
Cache::docloader->append( this );
}
diff --git a/WebCore/kwq/KWQObject.mm b/WebCore/kwq/KWQObject.mm
index ba3e832..82b40e1 100644
--- a/WebCore/kwq/KWQObject.mm
+++ b/WebCore/kwq/KWQObject.mm
@@ -24,6 +24,7 @@
*/
#include <qobject.h>
+#include <qvariant.h>
#include <kwqdebug.h>
@@ -70,11 +71,10 @@ void QObject::setName(const char *)
_logNeverImplemented();
}
-#ifdef DO_QVARIANT
QVariant QObject::property(const char *name) const
{
+ _logNeverImplemented();
}
-#endif
bool QObject::inherits(const char *) const
{
diff --git a/WebCore/kwq/KWQbrowserextension.mm b/WebCore/kwq/KWQbrowserextension.mm
index 184a078..8dbddb7 100644
--- a/WebCore/kwq/KWQbrowserextension.mm
+++ b/WebCore/kwq/KWQbrowserextension.mm
@@ -22,6 +22,7 @@
* (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>
@@ -31,28 +32,72 @@ namespace KParts {
BrowserExtension::~BrowserExtension()
{
+ _logNotYetImplemented();
}
BrowserInterface *BrowserExtension::browserInterface() const
{
+ _logNotYetImplemented();
}
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();
+}
// 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();
}
diff --git a/WebCore/kwq/Makefile.in b/WebCore/kwq/Makefile.in
index 5c84a78..7cc249f 100644
--- a/WebCore/kwq/Makefile.in
+++ b/WebCore/kwq/Makefile.in
@@ -22,107 +22,110 @@ SOURCES = $(wildcard *.mm)
HEADERS = $(wildcard *.h)
MMOBJECTS = \
- kwqdebug.o \
- _KWQOwner.o \
- KWQasyncimageio.o \
- KWQasyncio.o \
- KWQbrowserextension.o \
- KWQsignals.o \
- KWQtextcodec.o \
- KWQtextstream.o \
- KWQApplication.o \
- KWQBitmap.o \
- KWQBrush.o \
- KWQButton.o \
- KWQCheckBox.o \
- KWQColor.o \
- KWQColorGroup.o \
- KWQComboBox.o \
- KWQCompletion.o \
- KWQCursor.o \
- KWQDrawUtil.o \
- KWQEvent.o \
- KWQFont.o \
- KWQFontDatabase.o \
- KWQFontInfo.o \
- KWQFontMetrics.o \
- KWQFrame.o \
- KWQHBox.o \
- KWQImage.o \
- KWQKjobclasses.o \
- KWQKnetaccess.o \
- KWQKstddirs.o \
- KWQKApplication.o \
- KWQKCharsets.o \
- KWQKComboBox.o \
- KWQKCompletionBox.o \
- KWQKConfigBase.o \
- KWQKCursor.o \
- KWQKDebug.o \
- KWQKFactory.o \
- KWQKFileItem.o \
- KWQKFileDialog.o \
- KWQKGlobal.o \
- KWQKGlobalSettings.o \
- KWQKHistoryProvider.o \
- KWQKHTMLPart.o \
- KWQKHTMLPartBrowserExtension.o \
- KWQKHTMLFactory.o \
- KWQKHTMLSettings.o \
- KWQKHTMLView.o \
- KWQKIconLoader.o \
- KWQKImageIO.o \
- KWQKInstance.o \
- KWQKJavaEmbed.o \
- KWQKJob.o \
- KWQKLocale.o \
- KWQKLineEdit.o \
- KWQKListBox.o \
- KWQKMimeType.o \
- KWQKMessageBox.o \
- KWQKPartsEvent.o \
- KWQKPrinter.o \
- KWQKProcess.o \
- KWQKProtocolManager.o \
- KWQKScheduler.o \
- KWQKSimpleConfig.o \
- KWQKStringHandler.o \
- KWQKWin.o \
- KWQKWinModule.o \
- KWQLabel.o \
- KWQListBox.o \
- KWQLineEdit.o \
- KWQMovie.o \
- KWQNSTextField.o \
- KWQObject.o \
- KWQPainter.o \
- KWQPaintDevice.o \
- KWQPaintDeviceMetrics.o \
- KWQPalette.o \
- KWQPart.o \
- KWQPen.o \
- KWQPixmap.o \
- KWQPointArray.o \
- KWQPushButton.o \
- KWQRadioButton.o \
- KWQScrollView.o \
- KWQStyle.o \
- KWQTextEdit.o \
- KWQTextArea.o \
- KWQTimer.o \
- KWQToolTip.o \
- KWQVariant.o \
- KWQView.o \
- KWQWMatrix.o \
- KWQWidget.o \
- KWQxml.o \
- KWQChar.o \
- KWQString.o \
- KWQCString.o \
- KWQRegion.o \
- KWQDateTime.o \
- KWQKloader.o \
- $(NULL)
+ KWQApplication.o \
+ KWQBitmap.o \
+ KWQBrush.o \
+ KWQButton.o \
+ KWQCString.o \
+ KWQChar.o \
+ KWQCheckBox.o \
+ KWQColor.o \
+ KWQColorGroup.o \
+ KWQComboBox.o \
+ KWQCompletion.o \
+ KWQCursor.o \
+ KWQDCOPClient.o \
+ KWQDateTime.o \
+ KWQDrawUtil.o \
+ KWQEvent.o \
+ KWQFont.o \
+ KWQFontDatabase.o \
+ KWQFontInfo.o \
+ KWQFontMetrics.o \
+ KWQFrame.o \
+ KWQHBox.o \
+ KWQImage.o \
+ KWQInputDialog.o \
+ KWQKApplication.o \
+ KWQKCharsets.o \
+ KWQKComboBox.o \
+ KWQKCompletionBox.o \
+ KWQKConfigBase.o \
+ KWQKCursor.o \
+ KWQKDebug.o \
+ KWQKFactory.o \
+ KWQKFileDialog.o \
+ KWQKFileItem.o \
+ KWQKGlobal.o \
+ KWQKGlobalSettings.o \
+ KWQKHTMLFactory.o \
+ KWQKHTMLPart.o \
+ KWQKHTMLPartBrowserExtension.o \
+ KWQKHTMLSettings.o \
+ KWQKHTMLView.o \
+ KWQKHistoryProvider.o \
+ KWQKIconLoader.o \
+ KWQKImageIO.o \
+ KWQKInstance.o \
+ KWQKJavaEmbed.o \
+ KWQKJob.o \
+ KWQKLineEdit.o \
+ KWQKListBox.o \
+ KWQKLocale.o \
+ KWQKMessageBox.o \
+ KWQKMimeType.o \
+ KWQKPartsEvent.o \
+ KWQKPrinter.o \
+ KWQKProcess.o \
+ KWQKProtocolManager.o \
+ KWQKScheduler.o \
+ KWQKSimpleConfig.o \
+ KWQKStringHandler.o \
+ KWQKWin.o \
+ KWQKWinModule.o \
+ KWQKjobclasses.o \
+ KWQKloader.o \
+ KWQKnetaccess.o \
+ KWQKstddirs.o \
+ KWQLabel.o \
+ KWQLineEdit.o \
+ KWQListBox.o \
+ KWQMovie.o \
+ KWQNSTextField.o \
+ KWQObject.o \
+ KWQPaintDevice.o \
+ KWQPaintDeviceMetrics.o \
+ KWQPainter.o \
+ KWQPalette.o \
+ KWQPart.o \
+ KWQPen.o \
+ KWQPixmap.o \
+ KWQPointArray.o \
+ KWQPushButton.o \
+ KWQRadioButton.o \
+ KWQRegion.o \
+ KWQScrollView.o \
+ KWQString.o \
+ KWQStyle.o \
+ KWQTextArea.o \
+ KWQTextEdit.o \
+ KWQTimer.o \
+ KWQToolTip.o \
+ KWQVariant.o \
+ KWQView.o \
+ KWQWMatrix.o \
+ KWQWidget.o \
+ KWQasyncimageio.o \
+ KWQasyncio.o \
+ KWQbrowserextension.o \
+ KWQbrowserinterface.o \
+ KWQsignals.o \
+ KWQtextcodec.o \
+ KWQtextstream.o \
+ KWQxml.o \
+ _KWQOwner.o \
+ kwqdebug.o \
+ $(NULL)
MOBJECTS = \
$(NULL)
@@ -150,6 +153,7 @@ CMMFLAGS = $(BASECMMFLAGS) \
-I$(TOPSRCDIR)/WebCore/include \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/dom \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/html \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/misc \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/xml \
diff --git a/WebCore/kwq/qt/qguardedptr.h b/WebCore/kwq/qt/qguardedptr.h
index 2f58885..2eaacf3 100644
--- a/WebCore/kwq/qt/qguardedptr.h
+++ b/WebCore/kwq/qt/qguardedptr.h
@@ -32,6 +32,19 @@
#include "qobject.h"
+// class QGuardedPtrPrivate ====================================================
+
+class QGuardedPtrPrivate : public QObject, public QShared {
+public:
+ QGuardedPtrPrivate(QObject *o);
+ ~QGuardedPtrPrivate();
+
+ QObject *object() const;
+
+private:
+ QObject *p;
+};
+
// class QGuardedPtr ===========================================================
template <class T> class QGuardedPtr : public QObject {
@@ -44,25 +57,70 @@ public:
// constructors, copy constructors, and destructors ------------------------
- QGuardedPtr() {}
- QGuardedPtr(T *o) {}
- QGuardedPtr(const QGuardedPtr<T> &) {}
-
- ~QGuardedPtr() {}
+ QGuardedPtr() {
+ d = new QGuardedPtrPrivate(0L);
+ }
+ QGuardedPtr(T *o) {
+ d = new QGuardedPtrPrivate(o);
+ }
+
+ QGuardedPtr(const QGuardedPtr<T> &p) {
+ d = p.d;
+ ref();
+ }
+
+ ~QGuardedPtr() {
+ deref();
+ }
// member functions --------------------------------------------------------
- bool isNull() const {}
+ bool isNull() const {
+ return !d->object();
+ }
// operators ---------------------------------------------------------------
- QGuardedPtr &operator=(const QGuardedPtr &) {}
- operator T *() const {}
- T *operator->() const {}
+ QGuardedPtr &operator=(const QGuardedPtr &p) {
+ if (d != p.d) {
+ deref();
+ d = p.d;
+ ref();
+ }
+ return *this;
+ }
+
+ operator T *() const {
+ return (T*)d->object();
+ }
+
+ T *operator->() const {
+ return (T*)d->object();
+ }
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+private:
+ QGuardedPtrPrivate *d;
+
+ void ref()
+ {
+ d->ref();
+ }
+
+ void deref()
+ {
+ if (d->deref())
+ delete d;
+ }
+
}; // class QGuardedPtr ========================================================
+
+inline QObject *QGuardedPtrPrivate::object() const
+{
+ return p;
+}
+
#endif
diff --git a/WebCore/kwq/qt/qinputdialog.h b/WebCore/kwq/qt/qinputdialog.h
index 7a15d1a..4df4a48 100644
--- a/WebCore/kwq/qt/qinputdialog.h
+++ b/WebCore/kwq/qt/qinputdialog.h
@@ -74,3 +74,4 @@ private:
}; // class QInputDialog =======================================================
#endif
+
diff --git a/WebCore/src/kdelibs/khtml/Makefile.in b/WebCore/src/kdelibs/khtml/Makefile.in
index de8841e..d40b65e 100644
--- a/WebCore/src/kdelibs/khtml/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/Makefile.in
@@ -41,6 +41,7 @@ CLEAN_FILES = $(OBJECTS) \
# Set flags for this directory
CXXFLAGS = $(BASECXXFLAGS) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/dcop \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
diff --git a/WebCore/src/kdelibs/khtml/css/Makefile.in b/WebCore/src/kdelibs/khtml/css/Makefile.in
index b19e876..236ced0 100644
--- a/WebCore/src/kdelibs/khtml/css/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/css/Makefile.in
@@ -62,6 +62,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/dcop \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
diff --git a/WebCore/src/kdelibs/khtml/dom/Makefile.in b/WebCore/src/kdelibs/khtml/dom/Makefile.in
index 70761c1..3e98cfb 100644
--- a/WebCore/src/kdelibs/khtml/dom/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/dom/Makefile.in
@@ -41,6 +41,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
diff --git a/WebCore/src/kdelibs/khtml/dom/html_document.cpp b/WebCore/src/kdelibs/khtml/dom/html_document.cpp
index 5f9f80f..ec7bff6 100644
--- a/WebCore/src/kdelibs/khtml/dom/html_document.cpp
+++ b/WebCore/src/kdelibs/khtml/dom/html_document.cpp
@@ -41,7 +41,6 @@
#include "khtmlview.h"
using namespace DOM;
-
HTMLDocument::HTMLDocument() : Document(false) // create the impl here
{
impl = new HTMLDocumentImpl();
@@ -179,6 +178,9 @@ HTMLCollection HTMLDocument::all() const
DOMString HTMLDocument::cookie() const
{
+#ifdef _KWQ_
+ fprintf(stderr, "ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
+#else
QCString replyType;
QByteArray params, reply;
QDataStream stream(params, IO_WriteOnly);
@@ -199,10 +201,14 @@ DOMString HTMLDocument::cookie() const
QString result;
stream2 >> result;
return DOMString(result);
+#endif
}
void HTMLDocument::setCookie( const DOMString & value )
{
+#ifdef _KWQ_
+ fprintf(stderr, "ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
+#else
long windowId = view()->winId();
QByteArray params;
QDataStream stream(params, IO_WriteOnly);
@@ -215,6 +221,7 @@ void HTMLDocument::setCookie( const DOMString & value )
{
kdWarning(6010) << "Can't communicate with cookiejar!" << endl;
}
+#endif
}
void HTMLDocument::open( )
diff --git a/WebCore/src/kdelibs/khtml/ecma/Makefile.in b/WebCore/src/kdelibs/khtml/ecma/Makefile.in
index 6242626..21974c0 100644
--- a/WebCore/src/kdelibs/khtml/ecma/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/ecma/Makefile.in
@@ -41,6 +41,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
diff --git a/WebCore/src/kdelibs/khtml/ecma/kjs_css.cpp b/WebCore/src/kdelibs/khtml/ecma/kjs_css.cpp
index 5eae7cb..32c74a5 100644
--- a/WebCore/src/kdelibs/khtml/ecma/kjs_css.cpp
+++ b/WebCore/src/kdelibs/khtml/ecma/kjs_css.cpp
@@ -150,7 +150,7 @@ Completion DOMCSSStyleDeclarationFunc::tryExecute(const List &args)
String str = args[0].toString();
DOM::DOMString s = str.value().string();
- switch (id) {
+ switch (_id) {
case GetPropertyValue:
result = getString(styleDecl.getPropertyValue(s));
break;
@@ -294,7 +294,7 @@ Completion DOMStyleSheetListFunc::tryExecute(const List &args)
{
KJSO result;
- if (id == Item)
+ if (_id == Item)
result = getDOMStyleSheet(styleSheetList.item(args[0].toNumber().intValue()));
return Completion(ReturnValue, result);
}
@@ -357,7 +357,7 @@ Completion DOMMediaListFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case Item:
result = getString(mediaList.item(args[0].toNumber().intValue()));
break;
@@ -408,7 +408,7 @@ Completion DOMCSSStyleSheetFunc::tryExecute(const List &args)
String str = args[0].toString();
DOM::DOMString s = str.value().string();
- switch (id) {
+ switch (_id) {
case InsertRule:
result = Number(styleSheet.insertRule(args[0].toString().value().string(),(long unsigned int)args[1].toNumber().intValue()));
break;
@@ -452,7 +452,7 @@ Completion DOMCSSRuleListFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case Item:
result = getDOMCSSRule(cssRuleList.item(args[0].toNumber().intValue()));
break;
@@ -586,9 +586,9 @@ Completion DOMCSSRuleFunc::tryExecute(const List &args)
if (cssRule.type() == DOM::CSSRule::MEDIA_RULE) {
DOM::CSSMediaRule rule = static_cast<DOM::CSSMediaRule>(cssRule);
- if (id == InsertRule)
+ if (_id == InsertRule)
result = Number(rule.insertRule(args[0].toString().value().string(),args[1].toNumber().intValue()));
- else if (id == DeleteRule)
+ else if (_id == DeleteRule)
rule.deleteRule(args[0].toNumber().intValue());
}
@@ -773,7 +773,7 @@ Completion DOMCSSPrimitiveValueFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case SetFloatValue:
val.setFloatValue(args[0].toNumber().intValue(),args[1].toNumber().value());
result = Undefined();
@@ -879,7 +879,7 @@ Completion DOMCSSValueListFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case Item:
result = getDOMCSSValue(valueList.item(args[0].toNumber().intValue()));
break;
diff --git a/WebCore/src/kdelibs/khtml/ecma/kjs_css.h b/WebCore/src/kdelibs/khtml/ecma/kjs_css.h
index 4041ec7..b772fea 100644
--- a/WebCore/src/kdelibs/khtml/ecma/kjs_css.h
+++ b/WebCore/src/kdelibs/khtml/ecma/kjs_css.h
@@ -46,13 +46,13 @@ namespace KJS {
class DOMCSSStyleDeclarationFunc : public DOMFunction {
friend class DOMNode;
public:
- DOMCSSStyleDeclarationFunc(DOM::CSSStyleDeclaration s, int i) : styleDecl(s), id(i) { }
+ DOMCSSStyleDeclarationFunc(DOM::CSSStyleDeclaration s, int i) : styleDecl(s), _id(i) { }
Completion tryExecute(const List &);
enum { GetPropertyValue, GetPropertyCSSValue, RemoveProperty, GetPropertyPriority,
SetProperty, Item };
private:
DOM::CSSStyleDeclaration styleDecl;
- int id;
+ int _id;
};
KJSO getDOMCSSStyleDeclaration(DOM::CSSStyleDeclaration n);
@@ -90,12 +90,12 @@ namespace KJS {
class DOMStyleSheetListFunc : public DOMFunction {
friend class DOMStyleSheetList;
public:
- DOMStyleSheetListFunc(DOM::StyleSheetList ssl, int i) : styleSheetList(ssl), id(i) { }
+ DOMStyleSheetListFunc(DOM::StyleSheetList ssl, int i) : styleSheetList(ssl), _id(i) { }
Completion tryExecute(const List &);
enum { Item };
private:
DOM::StyleSheetList styleSheetList;
- int id;
+ int _id;
};
class DOMMediaList : public DOMObject {
@@ -116,12 +116,12 @@ namespace KJS {
class DOMMediaListFunc : public DOMFunction {
friend class DOMMediaList;
public:
- DOMMediaListFunc(DOM::MediaList ml, int i) : mediaList(ml), id(i) { }
+ DOMMediaListFunc(DOM::MediaList ml, int i) : mediaList(ml), _id(i) { }
Completion tryExecute(const List &);
enum { Item, DeleteMedium, AppendMedium };
private:
DOM::MediaList mediaList;
- int id;
+ int _id;
};
class DOMCSSStyleSheet : public DOMStyleSheet {
@@ -137,12 +137,12 @@ namespace KJS {
class DOMCSSStyleSheetFunc : public DOMFunction {
friend class DOMNode;
public:
- DOMCSSStyleSheetFunc(DOM::CSSStyleSheet ss, int i) : styleSheet(ss), id(i) { }
+ DOMCSSStyleSheetFunc(DOM::CSSStyleSheet ss, int i) : styleSheet(ss), _id(i) { }
Completion tryExecute(const List &);
enum { InsertRule, DeleteRule };
private:
DOM::CSSStyleSheet styleSheet;
- int id;
+ int _id;
};
class DOMCSSRuleList : public DOMObject {
@@ -159,12 +159,12 @@ namespace KJS {
class DOMCSSRuleListFunc : public DOMFunction {
public:
- DOMCSSRuleListFunc(DOM::CSSRuleList rl, int i) : cssRuleList(rl), id(i) { }
+ DOMCSSRuleListFunc(DOM::CSSRuleList rl, int i) : cssRuleList(rl), _id(i) { }
Completion tryExecute(const List &);
enum { Item };
private:
DOM::CSSRuleList cssRuleList;
- int id;
+ int _id;
};
KJSO getDOMCSSRuleList(DOM::CSSRuleList rl);
@@ -184,12 +184,12 @@ namespace KJS {
class DOMCSSRuleFunc : public DOMFunction {
public:
- DOMCSSRuleFunc(DOM::CSSRule r, int i) : cssRule(r), id(i) { }
+ DOMCSSRuleFunc(DOM::CSSRule r, int i) : cssRule(r), _id(i) { }
Completion tryExecute(const List &);
enum { Item, InsertRule, DeleteRule };
private:
DOM::CSSRule cssRule;
- int id;
+ int _id;
};
KJSO getDOMCSSRule(DOM::CSSRule r);
@@ -249,13 +249,13 @@ namespace KJS {
class DOMCSSPrimitiveValueFunc : public DOMFunction {
friend class DOMNode;
public:
- DOMCSSPrimitiveValueFunc(DOM::CSSPrimitiveValue v, int i) : val(v), id(i) { }
+ DOMCSSPrimitiveValueFunc(DOM::CSSPrimitiveValue v, int i) : val(v), _id(i) { }
Completion tryExecute(const List &);
enum { SetFloatValue, GetFloatValue, SetStringValue, GetStringValue,
GetCounterValue, GetRectValue, GetRGBColorValue };
private:
DOM::CSSPrimitiveValue val;
- int id;
+ int _id;
};
// Prototype object CSSPrimitiveValue
@@ -281,12 +281,12 @@ namespace KJS {
class DOMCSSValueListFunc : public DOMFunction {
public:
- DOMCSSValueListFunc(DOM::CSSValueList vl, int i) : valueList(vl), id(i) { }
+ DOMCSSValueListFunc(DOM::CSSValueList vl, int i) : valueList(vl), _id(i) { }
Completion tryExecute(const List &);
enum { Item };
private:
DOM::CSSValueList valueList;
- int id;
+ int _id;
};
class DOMRGBColor : public DOMObject {
diff --git a/WebCore/src/kdelibs/khtml/ecma/kjs_dom.cpp b/WebCore/src/kdelibs/khtml/ecma/kjs_dom.cpp
index bfcdbde..045e03c 100644
--- a/WebCore/src/kdelibs/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/src/kdelibs/khtml/ecma/kjs_dom.cpp
@@ -324,7 +324,7 @@ Completion DOMNodeFunc::tryExecute(const List &args)
{
KJSO result;
- switch (id) {
+ switch (_id) {
case HasChildNodes:
result = Boolean(node.hasChildNodes());
break;
@@ -411,7 +411,7 @@ Completion DOMNodeListFunc::tryExecute(const List &args)
{
KJSO result;
- if (id == Item)
+ if (_id == Item)
result = getDOMNode(list.item(args[0].toNumber().intValue()));
return Completion(ReturnValue, result);
}
@@ -528,7 +528,7 @@ KJSO DOMDocument::tryGet(const UString &p) const
}
DOMDocFunction::DOMDocFunction(DOM::Document d, int i)
- : doc(d), id(i)
+ : doc(d), _id(i)
{
}
@@ -540,7 +540,7 @@ Completion DOMDocFunction::tryExecute(const List &args)
String str = args[0].toString();
DOM::DOMString s = str.value().string();
- switch(id) {
+ switch(_id) {
case CreateElement:
result = getDOMNode(doc.createElement(s));
break;
@@ -670,7 +670,7 @@ KJSO DOMElement::tryGet(const UString &p) const
DOMElementFunction::DOMElementFunction(DOM::Element e, int i)
- : element(e), id(i)
+ : element(e), _id(i)
{
}
@@ -678,7 +678,7 @@ Completion DOMElementFunction::tryExecute(const List &args)
{
KJSO result;
- switch(id) {
+ switch(_id) {
case GetAttribute:
result = String(element.getAttribute(args[0].toString().value().string()));
break;
@@ -746,7 +746,7 @@ KJSO DOMDOMImplementation::tryGet(const UString &p) const
}
DOMDOMImplementationFunction::DOMDOMImplementationFunction(DOM::DOMImplementation impl, int i)
- : implementation(impl), id(i)
+ : implementation(impl), _id(i)
{
}
@@ -754,7 +754,7 @@ Completion DOMDOMImplementationFunction::tryExecute(const List &args)
{
KJSO result;
- switch(id) {
+ switch(_id) {
case HasFeature:
result = Boolean(implementation.hasFeature(args[0].toString().value().string(),args[1].toString().value().string()));
break;
@@ -836,7 +836,7 @@ KJSO DOMNamedNodeMap::tryGet(const UString &p) const
}
DOMNamedNodeMapFunction::DOMNamedNodeMapFunction(DOM::NamedNodeMap m, int i)
- : map(m), id(i)
+ : map(m), _id(i)
{
}
@@ -844,7 +844,7 @@ Completion DOMNamedNodeMapFunction::tryExecute(const List &args)
{
KJSO result;
- switch(id) {
+ switch(_id) {
case GetNamedItem:
result = getDOMNode(map.getNamedItem(args[0].toString().value().string()));
break;
diff --git a/WebCore/src/kdelibs/khtml/ecma/kjs_dom.h b/WebCore/src/kdelibs/khtml/ecma/kjs_dom.h
index d5820f5..ea42e7a 100644
--- a/WebCore/src/kdelibs/khtml/ecma/kjs_dom.h
+++ b/WebCore/src/kdelibs/khtml/ecma/kjs_dom.h
@@ -58,14 +58,14 @@ namespace KJS {
class DOMNodeFunc : public DOMFunction {
friend class DOMNode;
public:
- DOMNodeFunc(DOM::Node n, int i) : node(n), id(i) { }
+ DOMNodeFunc(DOM::Node n, int i) : node(n), _id(i) { }
Completion tryExecute(const List &);
enum { InsertBefore, ReplaceChild, RemoveChild, AppendChild,
HasChildNodes, CloneNode, AddEventListener, RemoveEventListener,
DispatchEvent };
private:
DOM::Node node;
- int id;
+ int _id;
};
class DOMNodeList : public DOMObject {
@@ -84,12 +84,12 @@ namespace KJS {
class DOMNodeListFunc : public DOMFunction {
friend class DOMNodeList;
public:
- DOMNodeListFunc(DOM::NodeList l, int i) : list(l), id(i) { }
+ DOMNodeListFunc(DOM::NodeList l, int i) : list(l), _id(i) { }
Completion tryExecute(const List &);
enum { Item };
private:
DOM::NodeList list;
- int id;
+ int _id;
};
class DOMDocument : public DOMNode {
@@ -112,7 +112,7 @@ namespace KJS {
CreateRange, CreateNodeIterator, CreateTreeWalker, CreateEvent, GetOverrideStyle };
private:
DOM::Document doc;
- int id;
+ int _id;
};
class DOMAttr : public DOMNode {
@@ -144,7 +144,7 @@ namespace KJS {
Normalize };
private:
DOM::Element element;
- int id;
+ int _id;
};
class DOMDOMImplementation : public DOMObject {
@@ -167,7 +167,7 @@ namespace KJS {
enum { HasFeature, CreateDocumentType, CreateDocument, CreateCSSStyleSheet };
private:
DOM::DOMImplementation implementation;
- int id;
+ int _id;
};
class DOMDocumentType : public DOMNode {
@@ -200,7 +200,7 @@ namespace KJS {
GetNamedItemNS, SetNamedItemNS, RemoveNamedItemNS };
private:
DOM::NamedNodeMap map;
- int id;
+ int _id;
};
class DOMProcessingInstruction : public DOMNode {
diff --git a/WebCore/src/kdelibs/khtml/ecma/kjs_window.cpp b/WebCore/src/kdelibs/khtml/ecma/kjs_window.cpp
index 50ee5b3..04d77dd 100644
--- a/WebCore/src/kdelibs/khtml/ecma/kjs_window.cpp
+++ b/WebCore/src/kdelibs/khtml/ecma/kjs_window.cpp
@@ -798,6 +798,7 @@ bool Window::isSafeScript() const
KHTMLPart *act = (KHTMLPart*)KJS::Global::current().extra();
if (!act)
kdDebug(6070) << "Window::isSafeScript: KJS::Global::current().extra() is 0L!" << endl;
+
return act && originCheck(m_part->url(), act->url());
}
diff --git a/WebCore/src/kdelibs/khtml/ecma/testecma.cpp b/WebCore/src/kdelibs/khtml/ecma/testecma.cpp
index 43b0b2a..dd3be39 100644
--- a/WebCore/src/kdelibs/khtml/ecma/testecma.cpp
+++ b/WebCore/src/kdelibs/khtml/ecma/testecma.cpp
@@ -31,6 +31,10 @@
* ---> foo
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <kjs/kjs.h>
#include <dom_doc.h>
@@ -46,8 +50,8 @@ int main(int, char **)
kjs.enableDebug();
DOM::Document doc;
- DOMDocument *dd = new DOMDocument(&doc);
- Global::current().put("document", KJSO(dd));
+ DOMDocument *dd = new DOMDocument(&doc);
+ Global::current().put("document", KJSO(dd));
printf("Entering interactive mode.\n"
"You may access the DOM via the 'document' property.\n"
diff --git a/WebCore/src/kdelibs/khtml/html/Makefile.in b/WebCore/src/kdelibs/khtml/html/Makefile.in
index 92da133..fe0a001 100644
--- a/WebCore/src/kdelibs/khtml/html/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/html/Makefile.in
@@ -38,6 +38,7 @@ CLEAN_FILES = $(OBJECTS) \
# Set flags for this directory
CXXFLAGS = $(BASECXXFLAGS) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/dcop \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
diff --git a/WebCore/src/kdelibs/khtml/java/Makefile.in b/WebCore/src/kdelibs/khtml/java/Makefile.in
index eb718d7..af8bbc1 100644
--- a/WebCore/src/kdelibs/khtml/java/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/java/Makefile.in
@@ -49,6 +49,7 @@ CXXFLAGS = $(BASECXXFLAGS) \
-DNEED_BOGUS_TEXTSTREAMS \
-DNEED_BOGUS_X_DEFINES \
-I$(TOPSRCDIR)/WebCore/src/kwq \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
-I$(TOPSRCDIR)/WebCore/src/kwq/kdecore \
diff --git a/WebCore/src/kdelibs/khtml/misc/Makefile.in b/WebCore/src/kdelibs/khtml/misc/Makefile.in
index 4ba1adb..04f1714 100644
--- a/WebCore/src/kdelibs/khtml/misc/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/misc/Makefile.in
@@ -56,6 +56,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
diff --git a/WebCore/src/kdelibs/khtml/rendering/Makefile.in b/WebCore/src/kdelibs/khtml/rendering/Makefile.in
index 622f9e0..a815ff6 100644
--- a/WebCore/src/kdelibs/khtml/rendering/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/rendering/Makefile.in
@@ -38,7 +38,8 @@ CLEAN_FILES = $(OBJECTS) \
# Set flags for this directory
CXXFLAGS = $(BASECXXFLAGS) \
- -DNEED_BOGUS_X_DEFINES \
+ -DNEED_BOGUS_X_DEFINES \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/qt \
diff --git a/WebCore/src/kdelibs/khtml/xml/Makefile.in b/WebCore/src/kdelibs/khtml/xml/Makefile.in
index ddfc9db..9ce71ed 100644
--- a/WebCore/src/kdelibs/khtml/xml/Makefile.in
+++ b/WebCore/src/kdelibs/khtml/xml/Makefile.in
@@ -59,6 +59,7 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = $(BASECXXFLAGS) \
-DNEED_BOGUS_TEXTSTREAMS \
-I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kwq \
-I$(TOPSRCDIR)/WebCore/src/kwq/kde \
-I$(TOPSRCDIR)/WebCore/src/kwq/kdecore \
diff --git a/WebCore/src/kwq/KWQKHTMLPart.h b/WebCore/src/kwq/KWQKHTMLPart.h
index c8f7dd0..edea99b 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.h
+++ b/WebCore/src/kwq/KWQKHTMLPart.h
@@ -33,6 +33,8 @@
#include <kparts/part.h>
#include <kparts/browserextension.h>
+#include <kjs_proxy.h>
+
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
#import <WCURICacheData.h>
#endif
@@ -55,6 +57,9 @@ namespace khtml
class RenderPart;
};
+extern "C" {
+ KJSProxy *kjs_html_init(KHTMLPart *khtmlpart);
+}
class KHTMLPart : public KParts::ReadOnlyPart // a.k.a. WebPageDocument
{
@@ -568,9 +573,11 @@ public:
#endif
private:
+
KHTMLPartPrivate *d;
// DUBIOUS, why are impls being referenced?
DOM::HTMLDocumentImpl *docImpl() const;
+
};
#endif
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index 7b9b9f2..c5d7d5c 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -40,6 +40,9 @@
#include <xml/dom_docimpl.h>
#include <html/html_documentimpl.h>
#include <loader.h>
+#include <kjs.h>
+#include <kjs_dom.h>
+#include <dom_doc.h>
#include <KWQKHTMLPart.h>
@@ -108,6 +111,9 @@ public:
bool m_bFirstData:1;
bool m_haveEncoding:1;
bool m_haveCharset:1;
+
+ KJSProxy *m_jscript;
+ int m_runningScripts;
KHTMLPartPrivate(KHTMLPart *part)
{
@@ -125,6 +131,9 @@ public:
m_haveEncoding = false;
m_recv = [[KHTMLPartNotificationReceiver alloc] init];
m_recv->m_part = part;
+
+ m_jscript = 0L;
+ m_runningScripts = 0;
}
~KHTMLPartPrivate()
@@ -225,13 +234,16 @@ bool KHTMLPart::closeURL()
DOM::HTMLDocument KHTMLPart::htmlDocument() const
{
- _logNotYetImplemented();
+ 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
{
- _logNotYetImplemented();
+ return d->m_doc;
}
@@ -244,6 +256,7 @@ void KHTMLPart::setJScriptEnabled( bool enable )
bool KHTMLPart::jScriptEnabled() const
{
_logNotYetImplemented();
+ return TRUE;
}
@@ -256,25 +269,43 @@ void KHTMLPart::enableMetaRefresh( bool enable )
bool KHTMLPart::metaRefreshEnabled() const
{
_logNotYetImplemented();
+ return FALSE;
}
-
// DUBIOUS, rather than executing the script this document should be
// passed to the interpreter.
QVariant KHTMLPart::executeScript( const QString &script )
{
- _logNotYetImplemented();
+ return executeScript( DOM::Node(), script );
}
-
// DUBIOUS, rather than executing the script this document should be
// passed to the interpreter.
QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
{
- _logNotYetImplemented();
+ KJSProxy *proxy = jScript();
+
+ if (!proxy) {
+ return QVariant();
+ }
+
+ d->m_runningScripts++;
+ QVariant ret = proxy->evaluate( script.unicode(), script.length(), n );
+ d->m_runningScripts--;
+
+ // FIXME: implement
+ //if ( d->m_submitForm ) {
+ // submitFormAgain();
+ //}
+
+ if ( d->m_doc ) {
+ d->m_doc->updateRendering();
+ }
+
+ //kdDebug(6050) << "KHTMLPart::executeScript - done" << endl;
+ return ret;
}
-
void KHTMLPart::setJavaEnabled( bool enable )
{
_logNotYetImplemented();
@@ -284,6 +315,7 @@ void KHTMLPart::setJavaEnabled( bool enable )
bool KHTMLPart::javaEnabled() const
{
_logNotYetImplemented();
+ return FALSE;
}
@@ -654,7 +686,12 @@ const KHTMLSettings *KHTMLPart::settings() const
KJSProxy *KHTMLPart::jScript()
{
- _logNotYetImplemented();
+ if ( !d->m_jscript )
+ {
+ d->m_jscript = kjs_html_init(this);
+ }
+
+ return d->m_jscript;
}
diff --git a/WebCore/src/kwq/KWQKLocale.mm b/WebCore/src/kwq/KWQKLocale.mm
index 6547d9f..44cd5db 100644
--- a/WebCore/src/kwq/KWQKLocale.mm
+++ b/WebCore/src/kwq/KWQKLocale.mm
@@ -22,6 +22,7 @@
* (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 <qstring.h>
@@ -33,4 +34,9 @@ QString i18n(const char* text)
return QString (text);
}
+QString KLocale::language() const
+{
+ _logNotYetImplemented();
+ return QString();
+}
diff --git a/WebCore/src/kwq/KWQKProtocolManager.mm b/WebCore/src/kwq/KWQKProtocolManager.mm
index ce3df79..278d99f 100644
--- a/WebCore/src/kwq/KWQKProtocolManager.mm
+++ b/WebCore/src/kwq/KWQKProtocolManager.mm
@@ -23,6 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <kwqdebug.h>
+
#include <qstring.h>
#include <kprotocolmanager.h>
@@ -30,14 +32,19 @@
bool KProtocolManager::useProxy()
{
+ return FALSE;
}
QString KProtocolManager::httpProxy()
{
+ _logNotYetImplemented();
+ return QString();
}
QString KProtocolManager::userAgentForHost( const QString& )
{
+ _logNotYetImplemented();
+ return QString("intrigue-0.000001");
}
diff --git a/WebCore/src/kwq/KWQKloader.mm b/WebCore/src/kwq/KWQKloader.mm
index 0165b3a..baa02d2 100644
--- a/WebCore/src/kwq/KWQKloader.mm
+++ b/WebCore/src/kwq/KWQKloader.mm
@@ -776,6 +776,7 @@ DocLoader::DocLoader(KHTMLPart* part)
m_showAnimations = true;
m_part = part;
+ Cache::init();
Cache::docloader->append( this );
}
diff --git a/WebCore/src/kwq/KWQKstddirs.mm b/WebCore/src/kwq/KWQKstddirs.mm
index bf02f8e..76eeb11 100644
--- a/WebCore/src/kwq/KWQKstddirs.mm
+++ b/WebCore/src/kwq/KWQKstddirs.mm
@@ -37,3 +37,11 @@ QString locateLocal(const char *type, const QString &filename,
{
return "/symroots/appdata/"+filename;
}
+
+QString KStandardDirs::saveLocation(const char *, const QString &suffix = QString::null,
+ bool create = true) const
+{
+ _logNotYetImplemented();
+ return QString();
+}
+
diff --git a/WebCore/src/kwq/KWQObject.mm b/WebCore/src/kwq/KWQObject.mm
index ba3e832..82b40e1 100644
--- a/WebCore/src/kwq/KWQObject.mm
+++ b/WebCore/src/kwq/KWQObject.mm
@@ -24,6 +24,7 @@
*/
#include <qobject.h>
+#include <qvariant.h>
#include <kwqdebug.h>
@@ -70,11 +71,10 @@ void QObject::setName(const char *)
_logNeverImplemented();
}
-#ifdef DO_QVARIANT
QVariant QObject::property(const char *name) const
{
+ _logNeverImplemented();
}
-#endif
bool QObject::inherits(const char *) const
{
diff --git a/WebCore/src/kwq/KWQbrowserextension.mm b/WebCore/src/kwq/KWQbrowserextension.mm
index 184a078..8dbddb7 100644
--- a/WebCore/src/kwq/KWQbrowserextension.mm
+++ b/WebCore/src/kwq/KWQbrowserextension.mm
@@ -22,6 +22,7 @@
* (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>
@@ -31,28 +32,72 @@ namespace KParts {
BrowserExtension::~BrowserExtension()
{
+ _logNotYetImplemented();
}
BrowserInterface *BrowserExtension::browserInterface() const
{
+ _logNotYetImplemented();
}
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();
+}
// 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();
}
diff --git a/WebCore/src/kwq/Makefile.in b/WebCore/src/kwq/Makefile.in
index 5c84a78..7cc249f 100644
--- a/WebCore/src/kwq/Makefile.in
+++ b/WebCore/src/kwq/Makefile.in
@@ -22,107 +22,110 @@ SOURCES = $(wildcard *.mm)
HEADERS = $(wildcard *.h)
MMOBJECTS = \
- kwqdebug.o \
- _KWQOwner.o \
- KWQasyncimageio.o \
- KWQasyncio.o \
- KWQbrowserextension.o \
- KWQsignals.o \
- KWQtextcodec.o \
- KWQtextstream.o \
- KWQApplication.o \
- KWQBitmap.o \
- KWQBrush.o \
- KWQButton.o \
- KWQCheckBox.o \
- KWQColor.o \
- KWQColorGroup.o \
- KWQComboBox.o \
- KWQCompletion.o \
- KWQCursor.o \
- KWQDrawUtil.o \
- KWQEvent.o \
- KWQFont.o \
- KWQFontDatabase.o \
- KWQFontInfo.o \
- KWQFontMetrics.o \
- KWQFrame.o \
- KWQHBox.o \
- KWQImage.o \
- KWQKjobclasses.o \
- KWQKnetaccess.o \
- KWQKstddirs.o \
- KWQKApplication.o \
- KWQKCharsets.o \
- KWQKComboBox.o \
- KWQKCompletionBox.o \
- KWQKConfigBase.o \
- KWQKCursor.o \
- KWQKDebug.o \
- KWQKFactory.o \
- KWQKFileItem.o \
- KWQKFileDialog.o \
- KWQKGlobal.o \
- KWQKGlobalSettings.o \
- KWQKHistoryProvider.o \
- KWQKHTMLPart.o \
- KWQKHTMLPartBrowserExtension.o \
- KWQKHTMLFactory.o \
- KWQKHTMLSettings.o \
- KWQKHTMLView.o \
- KWQKIconLoader.o \
- KWQKImageIO.o \
- KWQKInstance.o \
- KWQKJavaEmbed.o \
- KWQKJob.o \
- KWQKLocale.o \
- KWQKLineEdit.o \
- KWQKListBox.o \
- KWQKMimeType.o \
- KWQKMessageBox.o \
- KWQKPartsEvent.o \
- KWQKPrinter.o \
- KWQKProcess.o \
- KWQKProtocolManager.o \
- KWQKScheduler.o \
- KWQKSimpleConfig.o \
- KWQKStringHandler.o \
- KWQKWin.o \
- KWQKWinModule.o \
- KWQLabel.o \
- KWQListBox.o \
- KWQLineEdit.o \
- KWQMovie.o \
- KWQNSTextField.o \
- KWQObject.o \
- KWQPainter.o \
- KWQPaintDevice.o \
- KWQPaintDeviceMetrics.o \
- KWQPalette.o \
- KWQPart.o \
- KWQPen.o \
- KWQPixmap.o \
- KWQPointArray.o \
- KWQPushButton.o \
- KWQRadioButton.o \
- KWQScrollView.o \
- KWQStyle.o \
- KWQTextEdit.o \
- KWQTextArea.o \
- KWQTimer.o \
- KWQToolTip.o \
- KWQVariant.o \
- KWQView.o \
- KWQWMatrix.o \
- KWQWidget.o \
- KWQxml.o \
- KWQChar.o \
- KWQString.o \
- KWQCString.o \
- KWQRegion.o \
- KWQDateTime.o \
- KWQKloader.o \
- $(NULL)
+ KWQApplication.o \
+ KWQBitmap.o \
+ KWQBrush.o \
+ KWQButton.o \
+ KWQCString.o \
+ KWQChar.o \
+ KWQCheckBox.o \
+ KWQColor.o \
+ KWQColorGroup.o \
+ KWQComboBox.o \
+ KWQCompletion.o \
+ KWQCursor.o \
+ KWQDCOPClient.o \
+ KWQDateTime.o \
+ KWQDrawUtil.o \
+ KWQEvent.o \
+ KWQFont.o \
+ KWQFontDatabase.o \
+ KWQFontInfo.o \
+ KWQFontMetrics.o \
+ KWQFrame.o \
+ KWQHBox.o \
+ KWQImage.o \
+ KWQInputDialog.o \
+ KWQKApplication.o \
+ KWQKCharsets.o \
+ KWQKComboBox.o \
+ KWQKCompletionBox.o \
+ KWQKConfigBase.o \
+ KWQKCursor.o \
+ KWQKDebug.o \
+ KWQKFactory.o \
+ KWQKFileDialog.o \
+ KWQKFileItem.o \
+ KWQKGlobal.o \
+ KWQKGlobalSettings.o \
+ KWQKHTMLFactory.o \
+ KWQKHTMLPart.o \
+ KWQKHTMLPartBrowserExtension.o \
+ KWQKHTMLSettings.o \
+ KWQKHTMLView.o \
+ KWQKHistoryProvider.o \
+ KWQKIconLoader.o \
+ KWQKImageIO.o \
+ KWQKInstance.o \
+ KWQKJavaEmbed.o \
+ KWQKJob.o \
+ KWQKLineEdit.o \
+ KWQKListBox.o \
+ KWQKLocale.o \
+ KWQKMessageBox.o \
+ KWQKMimeType.o \
+ KWQKPartsEvent.o \
+ KWQKPrinter.o \
+ KWQKProcess.o \
+ KWQKProtocolManager.o \
+ KWQKScheduler.o \
+ KWQKSimpleConfig.o \
+ KWQKStringHandler.o \
+ KWQKWin.o \
+ KWQKWinModule.o \
+ KWQKjobclasses.o \
+ KWQKloader.o \
+ KWQKnetaccess.o \
+ KWQKstddirs.o \
+ KWQLabel.o \
+ KWQLineEdit.o \
+ KWQListBox.o \
+ KWQMovie.o \
+ KWQNSTextField.o \
+ KWQObject.o \
+ KWQPaintDevice.o \
+ KWQPaintDeviceMetrics.o \
+ KWQPainter.o \
+ KWQPalette.o \
+ KWQPart.o \
+ KWQPen.o \
+ KWQPixmap.o \
+ KWQPointArray.o \
+ KWQPushButton.o \
+ KWQRadioButton.o \
+ KWQRegion.o \
+ KWQScrollView.o \
+ KWQString.o \
+ KWQStyle.o \
+ KWQTextArea.o \
+ KWQTextEdit.o \
+ KWQTimer.o \
+ KWQToolTip.o \
+ KWQVariant.o \
+ KWQView.o \
+ KWQWMatrix.o \
+ KWQWidget.o \
+ KWQasyncimageio.o \
+ KWQasyncio.o \
+ KWQbrowserextension.o \
+ KWQbrowserinterface.o \
+ KWQsignals.o \
+ KWQtextcodec.o \
+ KWQtextstream.o \
+ KWQxml.o \
+ _KWQOwner.o \
+ kwqdebug.o \
+ $(NULL)
MOBJECTS = \
$(NULL)
@@ -150,6 +153,7 @@ CMMFLAGS = $(BASECMMFLAGS) \
-I$(TOPSRCDIR)/WebCore/include \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/dom \
+ -I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/ecma \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/html \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/misc \
-I$(TOPSRCDIR)/WebCore/src/kdelibs/khtml/xml \
diff --git a/WebCore/src/kwq/qt/qguardedptr.h b/WebCore/src/kwq/qt/qguardedptr.h
index 2f58885..2eaacf3 100644
--- a/WebCore/src/kwq/qt/qguardedptr.h
+++ b/WebCore/src/kwq/qt/qguardedptr.h
@@ -32,6 +32,19 @@
#include "qobject.h"
+// class QGuardedPtrPrivate ====================================================
+
+class QGuardedPtrPrivate : public QObject, public QShared {
+public:
+ QGuardedPtrPrivate(QObject *o);
+ ~QGuardedPtrPrivate();
+
+ QObject *object() const;
+
+private:
+ QObject *p;
+};
+
// class QGuardedPtr ===========================================================
template <class T> class QGuardedPtr : public QObject {
@@ -44,25 +57,70 @@ public:
// constructors, copy constructors, and destructors ------------------------
- QGuardedPtr() {}
- QGuardedPtr(T *o) {}
- QGuardedPtr(const QGuardedPtr<T> &) {}
-
- ~QGuardedPtr() {}
+ QGuardedPtr() {
+ d = new QGuardedPtrPrivate(0L);
+ }
+ QGuardedPtr(T *o) {
+ d = new QGuardedPtrPrivate(o);
+ }
+
+ QGuardedPtr(const QGuardedPtr<T> &p) {
+ d = p.d;
+ ref();
+ }
+
+ ~QGuardedPtr() {
+ deref();
+ }
// member functions --------------------------------------------------------
- bool isNull() const {}
+ bool isNull() const {
+ return !d->object();
+ }
// operators ---------------------------------------------------------------
- QGuardedPtr &operator=(const QGuardedPtr &) {}
- operator T *() const {}
- T *operator->() const {}
+ QGuardedPtr &operator=(const QGuardedPtr &p) {
+ if (d != p.d) {
+ deref();
+ d = p.d;
+ ref();
+ }
+ return *this;
+ }
+
+ operator T *() const {
+ return (T*)d->object();
+ }
+
+ T *operator->() const {
+ return (T*)d->object();
+ }
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+private:
+ QGuardedPtrPrivate *d;
+
+ void ref()
+ {
+ d->ref();
+ }
+
+ void deref()
+ {
+ if (d->deref())
+ delete d;
+ }
+
}; // class QGuardedPtr ========================================================
+
+inline QObject *QGuardedPtrPrivate::object() const
+{
+ return p;
+}
+
#endif
diff --git a/WebCore/src/kwq/qt/qinputdialog.h b/WebCore/src/kwq/qt/qinputdialog.h
index 7a15d1a..4df4a48 100644
--- a/WebCore/src/kwq/qt/qinputdialog.h
+++ b/WebCore/src/kwq/qt/qinputdialog.h
@@ -74,3 +74,4 @@ private:
}; // class QInputDialog =======================================================
#endif
+
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list