diff -udBbr kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_bridge.h kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_bridge.h --- kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_bridge.h 2003-10-26 13:52:36.000000000 +0300 +++ kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_bridge.h 2004-04-22 00:12:13.212404080 +0400 @@ -90,7 +90,7 @@ // kdDebug(26004) << "KSVGBridge::put(), " << propertyName.qstring() << " Name: " << classInfo()->className << " Object: " << m_impl << endl; // Try to see if we know this property (and need to take special action) - if(m_impl->put(exec, propertyName, value, attr)) + if(this->m_impl->put(exec, propertyName, value, attr)) return; // We don't -> set property in ObjectImp. diff -udBbr kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_lookup.h kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_lookup.h --- kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_lookup.h 2003-08-17 15:49:23.000000000 +0400 +++ kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_lookup.h 2004-04-21 23:34:50.954279128 +0400 @@ -21,10 +21,13 @@ #ifndef KSVG_LOOKUP_H #define KSVG_LOOKUP_H +#include + #include #include #include // for ExecState +//#include "ksvg_scriptinterpreter.h" class KSVGScriptInterpreter; #define KSVG_GET_COMMON \ @@ -188,6 +191,7 @@ * The "this" class must implement putValueProperty. * If it returns false, put() will return false, and KSVGRequest will set a dynamic property in ObjectImp */ +/* template inline bool lookupPut(KJS::ExecState *exec, const KJS::Identifier &propertyName, @@ -218,6 +222,7 @@ return true; } } +*/ /* moved to ksvg_scriptinterpreter.h */ } // Same as kjs' DEFINE_PROTOTYPE, but with a pointer to the hashtable too, and no ClassName here diff -udBbr kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_scriptinterpreter.h kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_scriptinterpreter.h --- kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_scriptinterpreter.h 2003-05-10 13:32:50.000000000 +0400 +++ kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/ecma/ksvg_scriptinterpreter.h 2004-04-21 23:40:36.693718744 +0400 @@ -68,6 +68,47 @@ QPtrDict m_domObjects; }; +namespace KSVG +{ + + /** + * This one is for "put". + * Lookup hash entry for property to be set, and set the value. + * The "this" class must implement putValueProperty. + * If it returns false, put() will return false, and KSVGRequest will set a dynamic property in ObjectImp + */ + template + inline bool lookupPut(KJS::ExecState *exec, + const KJS::Identifier &propertyName, + const KJS::Value &value, + int attr, + const KJS::HashTable *table, + ThisImp *thisObj) + { + const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName); + + if(!entry) // not found, forward to parents + return thisObj->putInParents(exec, propertyName, value, attr); + else if(entry->attr & KJS::Function) // Function: put as override property + return false; + else if(entry->attr & KJS::ReadOnly && !(attr & KJS::Internal)) // readonly! Can't put! + { +#ifdef KJS_VERBOSE + kdWarning(26004) <<" Attempt to change value of readonly property '" << propertyName.qstring() << "'" << endl; +#endif + return true; // "we did it" -> don't put override property + } + else + { + if(static_cast(exec->interpreter())->attributeSetMode()) + thisObj->m_attrFlags |= (1 << entry->value); + + thisObj->putValueProperty(exec, entry->value, value, attr); + return true; + } + } +} + // Lookup or create JS object around an existing "DOM Object" template inline KJS::Value cacheDOMObject(KJS::ExecState *exec, DOMObj *domObj) @@ -100,7 +141,7 @@ { ClassCtor* ctor = new ClassCtor(exec); // create the ClassCtor instance KJS::Object newObject(new KSVGBridge(exec, ctor)); // create the bridge around it - exec->interpreter()->globalObject().put(exec, propertyName, newObject, Internal); + exec->interpreter()->globalObject().put(exec, propertyName, newObject, KJS::Internal); return newObject; } } diff -udBbr kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/impl/SVGHelperImpl.h kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/impl/SVGHelperImpl.h --- kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/impl/SVGHelperImpl.h 2003-08-28 00:08:25.000000000 +0400 +++ kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/impl/SVGHelperImpl.h 2004-04-22 00:04:58.029561928 +0400 @@ -23,6 +23,7 @@ #include +#include "SVGElementImpl.h" #include "SVGLengthImpl.h" #include "ksvg_lookup.h" @@ -56,7 +57,7 @@ { T *cast = dynamic_cast(element->ownerDoc()->getElementFromHandle(node.handle())); if(cast) - cast->putValueProperty(element->ownerDoc()->ecmaEngine()->globalExec(), token, KJS::String(value), Internal); + cast->putValueProperty(element->ownerDoc()->ecmaEngine()->globalExec(), token, KJS::String(value), KJS::Internal); } } diff -udBbr kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/impl/SVGList.h kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/impl/SVGList.h --- kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/impl/SVGList.h 2004-01-17 15:52:40.000000000 +0300 +++ kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/impl/SVGList.h 2004-04-21 23:41:08.040953240 +0400 @@ -48,7 +48,7 @@ { public: SVGList() { m_impl.setAutoDelete(false); } - SVGList(const SVGList &) { *this = other; } + SVGList(const SVGList &other) { *this = other; } ~SVGList() { clear(); } SVGList &operator=(const SVGList &other) diff -udBbr kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/plugin/backends/libart/LibartCanvas.cpp kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/plugin/backends/libart/LibartCanvas.cpp --- kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/plugin/backends/libart/LibartCanvas.cpp 2003-11-30 12:46:17.000000000 +0300 +++ kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/plugin/backends/libart/LibartCanvas.cpp 2004-04-22 00:15:04.624345504 +0400 @@ -176,7 +176,7 @@ CanvasPaintServer *LibartCanvas::createPaintServer(SVGElementImpl *pserver) { - LibartPaintServer *result; + LibartPaintServer *result = NULL; if(dynamic_cast(pserver)) result = new LibartLinearGradient(dynamic_cast(pserver)); else if(dynamic_cast(pserver)) diff -udBbr kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/core/CanvasFactory.cpp kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/core/CanvasFactory.cpp --- kdegraphics-3.2.3/work/kdegraphics-3.2.3/ksvg/core/CanvasFactory.cpp 2003-11-30 12:46:12.000000000 +0300 +++ kdegraphics-3.2.3-fix1/work/kdegraphics-3.2.3/ksvg/core/CanvasFactory.cpp 2004-04-22 00:48:56.135508864 +0400 @@ -26,6 +26,7 @@ #include "KSVGCanvas.h" #include "CanvasFactory.h" +#include "CanvasItem.h" using namespace KSVG;