[webkit-changes] cvs commit: SVGSupport/ksvg2/svg SVGAElementImpl.h SVGAnimationElementImpl.h SVGCircleElementImpl.h SVGClipPathElementImpl.h SVGCursorElementImpl.h SVGDefsElementImpl.h SVGElementImpl.cpp SVGEllipseElementImpl.h SVGGElementImpl.h SVGImageElementImpl.h SVGLineElementImpl.h SVGLocatableImpl.cpp SVGPathElementImpl.h SVGPatternElementImpl.cpp SVGPatternElementImpl.h SVGPolyElementImpl.h SVGRectElementImpl.h SVGSVGElementImpl.cpp SVGSVGElementImpl.h SVGStyledElementImpl.cpp SVGStyledElementImpl.h SVGSwitchElementImpl.cpp SVGSwitchElementImpl.h SVGSymbolElementImpl.h SVGTestsImpl.cpp SVGTextContentElementImpl.h SVGUseElementImpl.h

Eric eseidel at opensource.apple.com
Sat Nov 26 14:35:54 PST 2005


eseidel     05/11/26 14:35:53

  Modified:    .        ChangeLog
               kcanvas/device/quartz KCanvasItemQuartz.mm
               khtml/xml dom_docimpl.cpp dom_nodeimpl.cpp dom_nodeimpl.h
                        xml_tokenizer.cpp
               ksvg2/svg SVGAElementImpl.h SVGAnimationElementImpl.h
                        SVGCircleElementImpl.h SVGClipPathElementImpl.h
                        SVGCursorElementImpl.h SVGDefsElementImpl.h
                        SVGElementImpl.cpp SVGEllipseElementImpl.h
                        SVGGElementImpl.h SVGImageElementImpl.h
                        SVGLineElementImpl.h SVGLocatableImpl.cpp
                        SVGPathElementImpl.h SVGPatternElementImpl.cpp
                        SVGPatternElementImpl.h SVGPolyElementImpl.h
                        SVGRectElementImpl.h SVGSVGElementImpl.cpp
                        SVGSVGElementImpl.h SVGStyledElementImpl.cpp
                        SVGStyledElementImpl.h SVGSwitchElementImpl.cpp
                        SVGSwitchElementImpl.h SVGSymbolElementImpl.h
                        SVGTestsImpl.cpp SVGTextContentElementImpl.h
                        SVGUseElementImpl.h
  Log:
  Bug #: 5810
  Submitted by: eseidel
  Reviewed by: mjs
          Fix support for <switch>:
          (by fixing isValid and adding childShouldCreateRenderer)
          Added remedial on* event support.
          Added basic <script> processing support.
          http://bugzilla.opendarwin.org/show_bug.cgi?id=5810
  
          * kcanvas/device/quartz/KCanvasItemQuartz.mm:
          (KCanvasItemQuartz::paint):
          * khtml/xml/dom_docimpl.cpp:
          (DocumentImpl::implicitClose):
          * khtml/xml/dom_nodeimpl.cpp:
          (DOM::NodeImpl::createRendererIfNeeded):
          * khtml/xml/dom_nodeimpl.h:
          (DOM::NodeImpl::childShouldCreateRenderer):
          * khtml/xml/xml_tokenizer.cpp:
          (khtml::XMLTokenizer::finish):
          (khtml::XMLTokenizer::addScripts):
          (khtml::xmlDocPtrForString):
          * ksvg2/svg/SVGAElementImpl.h:
          (KSVG::SVGAElementImpl::isValid):
          (KSVG::SVGAElementImpl::rendererIsNeeded):
          * ksvg2/svg/SVGAnimationElementImpl.h:
          (KSVG::SVGAnimationElementImpl::isValid):
          * ksvg2/svg/SVGCircleElementImpl.h:
          (KSVG::SVGCircleElementImpl::isValid):
          * ksvg2/svg/SVGClipPathElementImpl.h:
          (KSVG::SVGClipPathElementImpl::isValid):
          * ksvg2/svg/SVGCursorElementImpl.h:
          (KSVG::SVGCursorElementImpl::isValid):
          * ksvg2/svg/SVGDefsElementImpl.h:
          (KSVG::SVGDefsElementImpl::isValid):
          * ksvg2/svg/SVGElementImpl.cpp:
          (SVGElementImpl::parseMappedAttribute):
          * ksvg2/svg/SVGEllipseElementImpl.h:
          (KSVG::SVGEllipseElementImpl::isValid):
          * ksvg2/svg/SVGGElementImpl.h:
          (KSVG::SVGGElementImpl::isValid):
          * ksvg2/svg/SVGImageElementImpl.h:
          (KSVG::SVGImageElementImpl::isValid):
          * ksvg2/svg/SVGLineElementImpl.h:
          (KSVG::SVGLineElementImpl::isValid):
          * ksvg2/svg/SVGLocatableImpl.cpp:
          (SVGLocatableImpl::nearestViewportElement):
          (SVGLocatableImpl::farthestViewportElement):
          * ksvg2/svg/SVGPathElementImpl.h:
          (KSVG::SVGPathElementImpl::isValid):
          * ksvg2/svg/SVGPatternElementImpl.cpp:
          (SVGPatternElementImpl::drawPatternContentIntoTile):
          * ksvg2/svg/SVGPatternElementImpl.h:
          (KSVG::SVGPatternElementImpl::isValid):
          * ksvg2/svg/SVGPolyElementImpl.h:
          (KSVG::SVGPolyElementImpl::isValid):
          * ksvg2/svg/SVGRectElementImpl.h:
          (KSVG::SVGRectElementImpl::isValid):
          * ksvg2/svg/SVGSVGElementImpl.cpp:
          (SVGSVGElementImpl::parseMappedAttribute):
          * ksvg2/svg/SVGSVGElementImpl.h:
          (KSVG::SVGSVGElementImpl::isValid):
          * ksvg2/svg/SVGStyledElementImpl.cpp:
          (SVGStyledElementImpl::updateCanvasItem):
          * ksvg2/svg/SVGStyledElementImpl.h:
          * ksvg2/svg/SVGSwitchElementImpl.cpp:
          (SVGSwitchElementImpl::childShouldCreateRenderer):
          * ksvg2/svg/SVGSwitchElementImpl.h:
          (KSVG::SVGSwitchElementImpl::isValid):
          * ksvg2/svg/SVGSymbolElementImpl.h:
          (KSVG::SVGSymbolElementImpl::shouldAttachChild):
          * ksvg2/svg/SVGTestsImpl.cpp:
          (SVGTestsImpl::parseMappedAttribute):
          * ksvg2/svg/SVGTextContentElementImpl.h:
          (KSVG::SVGTextContentElementImpl::isValid):
          * ksvg2/svg/SVGUseElementImpl.h:
          (KSVG::SVGUseElementImpl::isValid):
  
  Revision  Changes    Path
  1.401     +78 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.400
  retrieving revision 1.401
  diff -u -r1.400 -r1.401
  --- ChangeLog	26 Nov 2005 22:26:59 -0000	1.400
  +++ ChangeLog	26 Nov 2005 22:35:38 -0000	1.401
  @@ -2,6 +2,84 @@
   
           Reviewed by mjs.
   
  +        Fix support for <switch>:
  +        (by fixing isValid and adding childShouldCreateRenderer)
  +        Added remedial on* event support.
  +        Added basic <script> processing support.
  +        http://bugzilla.opendarwin.org/show_bug.cgi?id=5810
  +
  +        * kcanvas/device/quartz/KCanvasItemQuartz.mm:
  +        (KCanvasItemQuartz::paint):
  +        * khtml/xml/dom_docimpl.cpp:
  +        (DocumentImpl::implicitClose):
  +        * khtml/xml/dom_nodeimpl.cpp:
  +        (DOM::NodeImpl::createRendererIfNeeded):
  +        * khtml/xml/dom_nodeimpl.h:
  +        (DOM::NodeImpl::childShouldCreateRenderer):
  +        * khtml/xml/xml_tokenizer.cpp:
  +        (khtml::XMLTokenizer::finish):
  +        (khtml::XMLTokenizer::addScripts):
  +        (khtml::xmlDocPtrForString):
  +        * ksvg2/svg/SVGAElementImpl.h:
  +        (KSVG::SVGAElementImpl::isValid):
  +        (KSVG::SVGAElementImpl::rendererIsNeeded):
  +        * ksvg2/svg/SVGAnimationElementImpl.h:
  +        (KSVG::SVGAnimationElementImpl::isValid):
  +        * ksvg2/svg/SVGCircleElementImpl.h:
  +        (KSVG::SVGCircleElementImpl::isValid):
  +        * ksvg2/svg/SVGClipPathElementImpl.h:
  +        (KSVG::SVGClipPathElementImpl::isValid):
  +        * ksvg2/svg/SVGCursorElementImpl.h:
  +        (KSVG::SVGCursorElementImpl::isValid):
  +        * ksvg2/svg/SVGDefsElementImpl.h:
  +        (KSVG::SVGDefsElementImpl::isValid):
  +        * ksvg2/svg/SVGElementImpl.cpp:
  +        (SVGElementImpl::parseMappedAttribute):
  +        * ksvg2/svg/SVGEllipseElementImpl.h:
  +        (KSVG::SVGEllipseElementImpl::isValid):
  +        * ksvg2/svg/SVGGElementImpl.h:
  +        (KSVG::SVGGElementImpl::isValid):
  +        * ksvg2/svg/SVGImageElementImpl.h:
  +        (KSVG::SVGImageElementImpl::isValid):
  +        * ksvg2/svg/SVGLineElementImpl.h:
  +        (KSVG::SVGLineElementImpl::isValid):
  +        * ksvg2/svg/SVGLocatableImpl.cpp:
  +        (SVGLocatableImpl::nearestViewportElement):
  +        (SVGLocatableImpl::farthestViewportElement):
  +        * ksvg2/svg/SVGPathElementImpl.h:
  +        (KSVG::SVGPathElementImpl::isValid):
  +        * ksvg2/svg/SVGPatternElementImpl.cpp:
  +        (SVGPatternElementImpl::drawPatternContentIntoTile):
  +        * ksvg2/svg/SVGPatternElementImpl.h:
  +        (KSVG::SVGPatternElementImpl::isValid):
  +        * ksvg2/svg/SVGPolyElementImpl.h:
  +        (KSVG::SVGPolyElementImpl::isValid):
  +        * ksvg2/svg/SVGRectElementImpl.h:
  +        (KSVG::SVGRectElementImpl::isValid):
  +        * ksvg2/svg/SVGSVGElementImpl.cpp:
  +        (SVGSVGElementImpl::parseMappedAttribute):
  +        * ksvg2/svg/SVGSVGElementImpl.h:
  +        (KSVG::SVGSVGElementImpl::isValid):
  +        * ksvg2/svg/SVGStyledElementImpl.cpp:
  +        (SVGStyledElementImpl::updateCanvasItem):
  +        * ksvg2/svg/SVGStyledElementImpl.h:
  +        * ksvg2/svg/SVGSwitchElementImpl.cpp:
  +        (SVGSwitchElementImpl::childShouldCreateRenderer):
  +        * ksvg2/svg/SVGSwitchElementImpl.h:
  +        (KSVG::SVGSwitchElementImpl::isValid):
  +        * ksvg2/svg/SVGSymbolElementImpl.h:
  +        (KSVG::SVGSymbolElementImpl::shouldAttachChild):
  +        * ksvg2/svg/SVGTestsImpl.cpp:
  +        (SVGTestsImpl::parseMappedAttribute):
  +        * ksvg2/svg/SVGTextContentElementImpl.h:
  +        (KSVG::SVGTextContentElementImpl::isValid):
  +        * ksvg2/svg/SVGUseElementImpl.h:
  +        (KSVG::SVGUseElementImpl::isValid):
  +
  +2005-11-26  Eric Seidel  <eseidel at apple.com>
  +
  +        Reviewed by mjs.
  +
           No additional test cases needed, this fixes 5 existing tests.
   
           This patch fixes feImage (to scale and flip).
  
  
  
  1.10      +1 -1      SVGSupport/kcanvas/device/quartz/KCanvasItemQuartz.mm
  
  Index: KCanvasItemQuartz.mm
  ===================================================================
  RCS file: /cvs/root/SVGSupport/kcanvas/device/quartz/KCanvasItemQuartz.mm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- KCanvasItemQuartz.mm	23 Nov 2005 15:14:07 -0000	1.9
  +++ KCanvasItemQuartz.mm	26 Nov 2005 22:35:43 -0000	1.10
  @@ -68,7 +68,7 @@
   
   void KCanvasItemQuartz::paint(PaintInfo &paintInfo, int parentX, int parentY)
   {
  -    if (paintInfo.p->paintingDisabled() || (paintInfo.phase != PaintActionForeground))
  +    if (paintInfo.p->paintingDisabled() || (paintInfo.phase != PaintActionForeground) || style()->visibility() == khtml::HIDDEN)
           return;
       
       KRenderingDeviceQuartz *quartzDevice = static_cast<KRenderingDeviceQuartz *>(canvas()->renderingDevice());
  
  
  
  1.278     +6 -2      WebCore/khtml/xml/dom_docimpl.cpp
  
  Index: dom_docimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.cpp,v
  retrieving revision 1.277
  retrieving revision 1.278
  diff -u -r1.277 -r1.278
  --- dom_docimpl.cpp	23 Nov 2005 15:14:08 -0000	1.277
  +++ dom_docimpl.cpp	26 Nov 2005 22:35:44 -0000	1.278
  @@ -1432,10 +1432,14 @@
                   body = 0;
           }
       }
  +    
  +    NodeImpl *onloadTarget = body;
  +    if (!isHTMLDocument())
  +        onloadTarget = documentElement();
   
  -    if (body) {
  +    if (onloadTarget) {
           dispatchImageLoadEventsNow();
  -        body->dispatchWindowEvent(loadEvent, false, false);
  +        onloadTarget->dispatchWindowEvent(loadEvent, false, false);
           if (KHTMLPart *p = part())
               KWQ(p)->handledOnloadEvents();
   #ifdef INSTRUMENT_LAYOUT_SCHEDULING
  
  
  
  1.216     +5 -1      WebCore/khtml/xml/dom_nodeimpl.cpp
  
  Index: dom_nodeimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.cpp,v
  retrieving revision 1.215
  retrieving revision 1.216
  diff -u -r1.215 -r1.216
  --- dom_nodeimpl.cpp	21 Nov 2005 04:01:58 -0000	1.215
  +++ dom_nodeimpl.cpp	26 Nov 2005 22:35:44 -0000	1.216
  @@ -1420,7 +1420,11 @@
       assert(parent);
           
       RenderObject *parentRenderer = parent->renderer();
  -    if (parentRenderer && parentRenderer->canHaveChildren()) {
  +    if (parentRenderer && parentRenderer->canHaveChildren()
  +#if SVG_SUPPORT
  +        && parent->childShouldCreateRenderer(this)
  +#endif
  +        ) {
           RenderStyle *style = styleForRenderer(parentRenderer);
           style->ref();
   #ifndef KHTML_NO_XBL
  
  
  
  1.116     +3 -0      WebCore/khtml/xml/dom_nodeimpl.h
  
  Index: dom_nodeimpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.h,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- dom_nodeimpl.h	21 Nov 2005 04:01:58 -0000	1.115
  +++ dom_nodeimpl.h	26 Nov 2005 22:35:45 -0000	1.116
  @@ -386,6 +386,9 @@
       void createRendererIfNeeded();
       virtual khtml::RenderStyle *styleForRenderer(khtml::RenderObject *parent);
       virtual bool rendererIsNeeded(khtml::RenderStyle *);
  +#if SVG_SUPPORT
  +    virtual bool childShouldCreateRenderer(DOM::NodeImpl *) const { return true; }
  +#endif
       virtual khtml::RenderObject *createRenderer(RenderArena *, khtml::RenderStyle *);
   
       // -----------------------------------------------------------------------------
  
  
  
  1.53      +18 -8     WebCore/khtml/xml/xml_tokenizer.cpp
  
  Index: xml_tokenizer.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/xml_tokenizer.cpp,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- xml_tokenizer.cpp	21 Nov 2005 01:20:43 -0000	1.52
  +++ xml_tokenizer.cpp	26 Nov 2005 22:35:45 -0000	1.53
  @@ -28,7 +28,7 @@
   #include "xml/dom_xmlimpl.h"
   #include "html/html_headimpl.h"
   #include "html/html_tableimpl.h"
  -#include "htmlnames.h"
  +#include "HTMLNames.h"
   #include "misc/loader.h"
   #include <kxmlcore/HashMap.h>
   
  @@ -40,6 +40,10 @@
   #include <libxml/parser.h>
   #include <libxml/parserInternals.h>
   
  +#if SVG_SUPPORT
  +#include "SVGNames.h"
  +#endif
  +
   #include <qptrstack.h>
   
   using namespace DOM;
  @@ -124,8 +128,8 @@
       int m_lastErrorColumn;
       DOMString m_errorMessages;
   
  -    QPtrList<HTMLScriptElementImpl> m_scripts;
  -    QPtrListIterator<HTMLScriptElementImpl> *m_scriptsIt;
  +    QPtrList<ElementImpl> m_scripts;
  +    QPtrListIterator<ElementImpl> *m_scriptsIt;
       CachedScript *m_cachedScript;
       
       bool m_parsingFragment;
  @@ -616,6 +620,8 @@
   
   void XMLTokenizer::finish()
   {
  +    if (m_xmlCode.isEmpty())
  +            return;
       xmlSAXHandler sax;
       memset(&sax, 0, sizeof(sax));
       sax.error = normalErrorHandler;
  @@ -649,7 +655,7 @@
           // Parsing was successful. Now locate all html <script> tags in the document and execute them
           // one by one.
           addScripts(m_doc);
  -        m_scriptsIt = new QPtrListIterator<HTMLScriptElementImpl>(m_scripts);
  +        m_scriptsIt = new QPtrListIterator<ElementImpl>(m_scripts);
           executeScripts();
       }
   
  @@ -705,10 +711,12 @@
   {
       // Recursively go through the entire document tree, looking for html <script> tags. For each of these
       // that is found, add it to the m_scripts list from which they will be executed
  -
  -    if (n->hasTagName(scriptTag)) {
  -        m_scripts.append(static_cast<HTMLScriptElementImpl*>(n));
  -    }
  +    if (n->hasTagName(scriptTag)
  +#if SVG_SUPPORT
  +        || n->hasTagName(KSVG::SVGNames::scriptTag)
  +#endif
  +        )
  +        m_scripts.append(static_cast<ElementImpl*>(n));
   
       NodeImpl *child;
       for (child = n->firstChild(); child; child = child->nextSibling())
  @@ -780,6 +788,8 @@
   #ifdef KHTML_XSLT
   void *xmlDocPtrForString(const QString &source, const QString &url)
   {
  +    if (source.isEmpty())
  +            return 0;
       // Parse in a single chunk into an xmlDocPtr
       // FIXME: Hook up error handlers so that a failure to parse the main document results in
       // good error messages.
  
  
  
  1.7       +2 -1      SVGSupport/ksvg2/svg/SVGAElementImpl.h
  
  Index: SVGAElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGAElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGAElementImpl.h	26 Nov 2005 22:19:03 -0000	1.6
  +++ SVGAElementImpl.h	26 Nov 2005 22:35:46 -0000	1.7
  @@ -44,12 +44,13 @@
   
           // 'SVGAElement' functions
           SVGAnimatedStringImpl *target() const;
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           virtual void parseMappedAttribute(KDOM::MappedAttributeImpl *attr);
   
           // Derived from: 'SVGStyledElementImpl'
           virtual bool rendererIsNeeded(khtml::RenderStyle *) { return true; }
  -
           virtual khtml::RenderObject *createRenderer(RenderArena *arena, khtml::RenderStyle *style);
   
           virtual void defaultEventHandler(KDOM::EventImpl *evt);
  
  
  
  1.8       +2 -0      SVGSupport/ksvg2/svg/SVGAnimationElementImpl.h
  
  Index: SVGAnimationElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGAnimationElementImpl.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SVGAnimationElementImpl.h	26 Nov 2005 22:19:04 -0000	1.7
  +++ SVGAnimationElementImpl.h	26 Nov 2005 22:35:46 -0000	1.8
  @@ -90,6 +90,8 @@
   
           // 'SVGAnimationElement' functions
           SVGElementImpl *targetElement() const;
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           double getEndTime() const;
           double getStartTime() const;
  
  
  
  1.7       +2 -0      SVGSupport/ksvg2/svg/SVGCircleElementImpl.h
  
  Index: SVGCircleElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGCircleElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGCircleElementImpl.h	26 Nov 2005 22:19:05 -0000	1.6
  +++ SVGCircleElementImpl.h	26 Nov 2005 22:35:46 -0000	1.7
  @@ -39,6 +39,8 @@
       public:
           SVGCircleElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGCircleElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGCircleElement' functions
           SVGAnimatedLengthImpl *cx() const;
  
  
  
  1.7       +2 -3      SVGSupport/ksvg2/svg/SVGClipPathElementImpl.h
  
  Index: SVGClipPathElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGClipPathElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGClipPathElementImpl.h	26 Nov 2005 22:19:05 -0000	1.6
  +++ SVGClipPathElementImpl.h	26 Nov 2005 22:35:47 -0000	1.7
  @@ -41,6 +41,8 @@
       public:
           SVGClipPathElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGClipPathElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           virtual KCanvasClipper *canvasResource();
   
  @@ -49,9 +51,6 @@
   
           virtual void parseMappedAttribute(KDOM::MappedAttributeImpl *attr);
   
  -        // Derived from: 'SVGStyledElementImpl'
  -        virtual bool allowAttachChildren(KDOM::ElementImpl *) const { return false; }
  -
       private:
           mutable SharedPtr<SVGAnimatedEnumerationImpl> m_clipPathUnits;
           KCanvasClipper *m_clipper;
  
  
  
  1.4       +2 -0      SVGSupport/ksvg2/svg/SVGCursorElementImpl.h
  
  Index: SVGCursorElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGCursorElementImpl.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SVGCursorElementImpl.h	26 Nov 2005 22:19:06 -0000	1.3
  +++ SVGCursorElementImpl.h	26 Nov 2005 22:35:47 -0000	1.4
  @@ -45,6 +45,8 @@
       public:
           SVGCursorElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGCursorElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGCursorElement' functions
           SVGAnimatedLengthImpl *x() const;
  
  
  
  1.6       +2 -3      SVGSupport/ksvg2/svg/SVGDefsElementImpl.h
  
  Index: SVGDefsElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGDefsElementImpl.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SVGDefsElementImpl.h	21 Nov 2005 08:29:36 -0000	1.5
  +++ SVGDefsElementImpl.h	26 Nov 2005 22:35:47 -0000	1.6
  @@ -38,9 +38,8 @@
       public:
           SVGDefsElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGDefsElementImpl();
  -
  -        // Derived from: 'SVGStyledElementImpl'
  -        virtual bool allowAttachChildren(KDOM::ElementImpl *) const { return false; }
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
       };
   };
   
  
  
  
  1.12      +4 -17     SVGSupport/ksvg2/svg/SVGElementImpl.cpp
  
  Index: SVGElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGElementImpl.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SVGElementImpl.cpp	26 Nov 2005 22:19:06 -0000	1.11
  +++ SVGElementImpl.cpp	26 Nov 2005 22:35:47 -0000	1.12
  @@ -31,12 +31,15 @@
   
   #include "ksvg.h"
   #include "SVGNames.h"
  -//#include "SVGException.h"
  +#include "EventNames.h"
  +#include "HTMLNames.h"
   #include "SVGElementImpl.h"
   #include "SVGSVGElementImpl.h"
   #include "SVGDOMImplementationImpl.h"
   
   using namespace KSVG;
  +using namespace DOM::HTMLNames;
  +using namespace DOM::EventNames;
   
   SVGElementImpl::SVGElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc) : KDOM::XMLElementImpl(tagName, doc), m_closed(false)
   {
  @@ -100,22 +103,6 @@
   
   void SVGElementImpl::parseMappedAttribute(KDOM::MappedAttributeImpl *attr)
   {
  -
  -//    if (attr->name() == SVGNames::onloadAttr)
  -//            addSVGEventListener(doc->ecmaEngine(), KDOM::DOMString("load"), value);
  -//    else if (attr->name() == SVGNames::onunloadAttr)
  -//            addSVGEventListener(doc->ecmaEngine(), KDOM::DOMString("unload"), value);
  -//    else if (attr->name() == SVGNames::onabortAttr)
  -//            addSVGEventListener(doc->ecmaEngine(), KDOM::DOMString("abort"), value);
  -//    else if (attr->name() == SVGNames::onerrorAttr)
  -//            addSVGEventListener(doc->ecmaEngine(), KDOM::DOMString("error"), value);
  -//    else if (attr->name() == SVGNames::onresizeAttr)
  -//            addSVGEventListener(doc->ecmaEngine(), KDOM::DOMString("resize"), value);
  -//    else if (attr->name() == SVGNames::onscrollAttr)
  -//            addSVGEventListener(doc->ecmaEngine(), KDOM::DOMString("scroll"), value);
  -//    else if (attr->name() == SVGNames::onzoomAttr)
  -//            addSVGEventListener(doc->ecmaEngine(), KDOM::DOMString("zoom"), value);
  -//    else
   #ifndef APPLE_COMPILE_HACK
       // We don't yet know how to support setIsId/isId
       if (attr->name() == SVGNames::idAttr)
  
  
  
  1.7       +2 -0      SVGSupport/ksvg2/svg/SVGEllipseElementImpl.h
  
  Index: SVGEllipseElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGEllipseElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGEllipseElementImpl.h	26 Nov 2005 22:19:07 -0000	1.6
  +++ SVGEllipseElementImpl.h	26 Nov 2005 22:35:47 -0000	1.7
  @@ -39,6 +39,8 @@
       public:
           SVGEllipseElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGEllipseElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGEllipseElement' functions
           SVGAnimatedLengthImpl *cx() const;
  
  
  
  1.6       +2 -0      SVGSupport/ksvg2/svg/SVGGElementImpl.h
  
  Index: SVGGElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGGElementImpl.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SVGGElementImpl.h	21 Nov 2005 08:29:40 -0000	1.5
  +++ SVGGElementImpl.h	26 Nov 2005 22:35:47 -0000	1.6
  @@ -38,6 +38,8 @@
       public:
           SVGGElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGGElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           virtual void parseMappedAttribute(KDOM::MappedAttributeImpl *attr);
   
  
  
  
  1.8       +2 -0      SVGSupport/ksvg2/svg/SVGImageElementImpl.h
  
  Index: SVGImageElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGImageElementImpl.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SVGImageElementImpl.h	26 Nov 2005 22:19:12 -0000	1.7
  +++ SVGImageElementImpl.h	26 Nov 2005 22:35:47 -0000	1.8
  @@ -48,6 +48,8 @@
       public:
           SVGImageElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGImageElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGImageElement' functions
           SVGAnimatedLengthImpl *x() const;
  
  
  
  1.7       +2 -0      SVGSupport/ksvg2/svg/SVGLineElementImpl.h
  
  Index: SVGLineElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGLineElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGLineElementImpl.h	26 Nov 2005 22:19:12 -0000	1.6
  +++ SVGLineElementImpl.h	26 Nov 2005 22:35:47 -0000	1.7
  @@ -39,6 +39,8 @@
       public:
           SVGLineElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGLineElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGLineElement' functions
           SVGAnimatedLengthImpl *x1() const;
  
  
  
  1.9       +4 -4      SVGSupport/ksvg2/svg/SVGLocatableImpl.cpp
  
  Index: SVGLocatableImpl.cpp
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGLocatableImpl.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SVGLocatableImpl.cpp	23 Nov 2005 15:14:09 -0000	1.8
  +++ SVGLocatableImpl.cpp	26 Nov 2005 22:35:47 -0000	1.9
  @@ -43,9 +43,9 @@
   SVGElementImpl *SVGLocatableImpl::nearestViewportElement(const SVGStyledElementImpl *e)
   {
       KDOM::NodeImpl *n = e->parentNode();
  -    while(n && n->nodeType() != KDOM::DOCUMENT_NODE)
  +    while(n && n->isDocumentNode())
       {
  -        if(n->nodeType() == KDOM::ELEMENT_NODE &&
  +        if(n->isElementNode() &&
               (n->hasTagName(SVGNames::svgTag) || n->hasTagName(SVGNames::symbolTag) ||
                n->hasTagName(SVGNames::foreignObjectTag) || n->hasTagName(SVGNames::imageTag)))
               return static_cast<SVGElementImpl *>(n);
  @@ -64,9 +64,9 @@
       // used instead. This depends on cdf demands though(Rob.)
       SVGElementImpl *farthest = 0;
       KDOM::NodeImpl *n = e->parentNode();
  -    while(n && n->nodeType() != KDOM::DOCUMENT_NODE)
  +    while(n && !n->isDocumentNode())
       {
  -        if(n->nodeType() == KDOM::ELEMENT_NODE &&
  +        if(n->isElementNode() &&
               (n->hasTagName(SVGNames::svgTag) || n->hasTagName(SVGNames::symbolTag) ||
                n->hasTagName(SVGNames::foreignObjectTag) || n->hasTagName(SVGNames::imageTag)))
               farthest = static_cast<SVGElementImpl *>(n);
  
  
  
  1.7       +2 -0      SVGSupport/ksvg2/svg/SVGPathElementImpl.h
  
  Index: SVGPathElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGPathElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGPathElementImpl.h	26 Nov 2005 22:19:14 -0000	1.6
  +++ SVGPathElementImpl.h	26 Nov 2005 22:35:48 -0000	1.7
  @@ -64,6 +64,8 @@
       public:
           SVGPathElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGPathElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           SVGAnimatedNumberImpl *pathLength() const;
           double getTotalLength();
  
  
  
  1.13      +10 -2     SVGSupport/ksvg2/svg/SVGPatternElementImpl.cpp
  
  Index: SVGPatternElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGPatternElementImpl.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SVGPatternElementImpl.cpp	26 Nov 2005 22:19:14 -0000	1.12
  +++ SVGPatternElementImpl.cpp	26 Nov 2005 22:35:48 -0000	1.13
  @@ -239,6 +239,13 @@
           khtml::RenderObject *item = e->renderer();
           if(!item)
               continue;
  +#if 0
  +        // FIXME: None of this code seems to be necessary
  +        // to pass the w3c tests (and infact breaks them)
  +        // However, I'm leaving it #if 0'd for now until
  +        // I can quiz WildFox on the subject -- ecs 11/24/05
  +        // It's possible that W3C-SVG-1.1/coords-units-01-b
  +        // is failing due to lack of this code.
           KCanvasMatrix savedMatrix = item->localTransform();
   
           const SVGStyledElementImpl *savedContext = 0;
  @@ -262,16 +269,17 @@
   
               item->setLocalTransform(newMatrix.qmatrix());
           }
  +#endif
   
  -        // FIXME: I'm not sure if this is right yet...
           QPainter p;
           khtml::RenderObject::PaintInfo info(&p, QRect(), PaintActionForeground, 0);
           item->paint(info, 0, 0);
  -
  +#if 0
           if(savedContext)
               e->pushAttributeContext(savedContext);
   
           item->setLocalTransform(savedMatrix.qmatrix());
  +#endif
       }
   
       if(savedContext)
  
  
  
  1.8       +2 -3      SVGSupport/ksvg2/svg/SVGPatternElementImpl.h
  
  Index: SVGPatternElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGPatternElementImpl.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SVGPatternElementImpl.h	26 Nov 2005 22:19:14 -0000	1.7
  +++ SVGPatternElementImpl.h	26 Nov 2005 22:35:48 -0000	1.8
  @@ -54,6 +54,8 @@
       public:
           SVGPatternElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGPatternElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGPatternElement' functions
           SVGAnimatedEnumerationImpl *patternUnits() const;
  @@ -73,9 +75,6 @@
           virtual void resourceNotification() const;
           virtual void notifyAttributeChange() const;
   
  -        // Derived from: 'SVGStyledElementImpl'
  -        virtual bool allowAttachChildren(KDOM::ElementImpl *) const { return true; }
  -
           virtual bool rendererIsNeeded(khtml::RenderStyle *) { return true; }
           virtual khtml::RenderObject *createRenderer(RenderArena *arena, khtml::RenderStyle *style);
           virtual KRenderingPaintServerPattern *canvasResource();
  
  
  
  1.7       +2 -0      SVGSupport/ksvg2/svg/SVGPolyElementImpl.h
  
  Index: SVGPolyElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGPolyElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGPolyElementImpl.h	26 Nov 2005 22:19:14 -0000	1.6
  +++ SVGPolyElementImpl.h	26 Nov 2005 22:35:48 -0000	1.7
  @@ -42,6 +42,8 @@
       public:
           SVGPolyElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGPolyElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // Derived from: 'SVGAnimatedPoints'
           virtual SVGPointListImpl *points() const;
  
  
  
  1.7       +2 -0      SVGSupport/ksvg2/svg/SVGRectElementImpl.h
  
  Index: SVGRectElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGRectElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGRectElementImpl.h	26 Nov 2005 22:19:15 -0000	1.6
  +++ SVGRectElementImpl.h	26 Nov 2005 22:35:48 -0000	1.7
  @@ -39,6 +39,8 @@
       public:
           SVGRectElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGRectElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGRectElement' functions
           SVGAnimatedLengthImpl *x() const;
  
  
  
  1.13      +23 -0     SVGSupport/ksvg2/svg/SVGSVGElementImpl.cpp
  
  Index: SVGSVGElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGSVGElementImpl.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SVGSVGElementImpl.cpp	26 Nov 2005 22:19:15 -0000	1.12
  +++ SVGSVGElementImpl.cpp	26 Nov 2005 22:35:48 -0000	1.13
  @@ -59,7 +59,12 @@
   #include <q3paintdevicemetrics.h>
   #include <qtextstream.h>
   
  +#include "HTMLNames.h"
  +#include "EventNames.h"
  +
   using namespace KSVG;
  +using namespace DOM::HTMLNames;
  +using namespace DOM::EventNames;
   
   SVGSVGElementImpl::SVGSVGElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc)
   : SVGStyledLocatableElementImpl(tagName, doc), SVGTestsImpl(), SVGLangSpaceImpl(),
  @@ -230,6 +235,24 @@
   void SVGSVGElementImpl::parseMappedAttribute(KDOM::MappedAttributeImpl *attr)
   {
       const KDOM::AtomicString& value = attr->value();
  +    if (!nearestViewportElement()) {
  +        // Only handle events if we're the outermost <svg> element
  +        QString value = attr->value().qstring();
  +        if (attr->name() == onloadAttr)
  +            getDocument()->setHTMLWindowEventListener(loadEvent, getDocument()->createHTMLEventListener(value, this));
  +        else if (attr->name() == onunloadAttr)
  +            getDocument()->setHTMLWindowEventListener(unloadEvent, getDocument()->createHTMLEventListener(value, this));
  +        else if (attr->name() == onabortAttr)
  +            getDocument()->setHTMLWindowEventListener(abortEvent, getDocument()->createHTMLEventListener(value, this));
  +        else if (attr->name() == onerrorAttr)
  +            getDocument()->setHTMLWindowEventListener(errorEvent, getDocument()->createHTMLEventListener(value, this));
  +        else if (attr->name() == onresizeAttr)
  +            getDocument()->setHTMLWindowEventListener(resizeEvent, getDocument()->createHTMLEventListener(value, this));
  +        else if (attr->name() == onscrollAttr)
  +            getDocument()->setHTMLWindowEventListener(scrollEvent, getDocument()->createHTMLEventListener(value, this));
  +        else if (attr->name() == SVGNames::onzoomAttr)
  +            getDocument()->setHTMLWindowEventListener(zoomEvent, getDocument()->createHTMLEventListener(value, this));
  +    }
       if (attr->name() == SVGNames::xAttr) {
           x()->baseVal()->setValueAsString(value.impl());
       } else if (attr->name() == SVGNames::yAttr) {
  
  
  
  1.10      +2 -0      SVGSupport/ksvg2/svg/SVGSVGElementImpl.h
  
  Index: SVGSVGElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGSVGElementImpl.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SVGSVGElementImpl.h	26 Nov 2005 22:19:15 -0000	1.9
  +++ SVGSVGElementImpl.h	26 Nov 2005 22:35:48 -0000	1.10
  @@ -60,6 +60,8 @@
           virtual ~SVGSVGElementImpl();
   
           virtual bool isSVG() const { return true; }
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGSVGElement' functions
           SVGAnimatedLengthImpl *x() const;
  
  
  
  1.12      +1 -1      SVGSupport/ksvg2/svg/SVGStyledElementImpl.cpp
  
  Index: SVGStyledElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGStyledElementImpl.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SVGStyledElementImpl.cpp	26 Nov 2005 22:19:16 -0000	1.11
  +++ SVGStyledElementImpl.cpp	26 Nov 2005 22:35:48 -0000	1.12
  @@ -142,7 +142,7 @@
       
       SVGElementImpl *parentElement = svg_dynamic_cast(parentNode());
       if(parentElement && parentElement->renderer() && parentElement->isStyled()
  -        && static_cast<SVGStyledElementImpl *>(parentElement)->allowAttachChildren(this))
  +        && parentElement->childShouldCreateRenderer(this))
           renderSection = true;
   
       KCanvasUserData newPath = KCanvasCreator::self()->createCanvasPathData(canvas()->renderingDevice(), toPathData());
  
  
  
  1.10      +0 -1      SVGSupport/ksvg2/svg/SVGStyledElementImpl.h
  
  Index: SVGStyledElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGStyledElementImpl.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SVGStyledElementImpl.h	26 Nov 2005 22:19:16 -0000	1.9
  +++ SVGStyledElementImpl.h	26 Nov 2005 22:35:48 -0000	1.10
  @@ -54,7 +54,6 @@
           virtual SVGAnimatedStringImpl *className() const;
   
           virtual void attach();
  -        virtual bool allowAttachChildren(KDOM::ElementImpl *) const { return true; }
   
           // These need to be implemented.
           virtual bool rendererIsNeeded(khtml::RenderStyle *) { return false; }
  
  
  
  1.8       +2 -3      SVGSupport/ksvg2/svg/SVGSwitchElementImpl.cpp
  
  Index: SVGSwitchElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGSwitchElementImpl.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SVGSwitchElementImpl.cpp	21 Nov 2005 08:29:42 -0000	1.7
  +++ SVGSwitchElementImpl.cpp	26 Nov 2005 22:35:49 -0000	1.8
  @@ -44,10 +44,9 @@
   {
   }
   
  -bool SVGSwitchElementImpl::allowAttachChildren(KDOM::ElementImpl *child) const
  +bool SVGSwitchElementImpl::childShouldCreateRenderer(KDOM::NodeImpl *child) const
   {
  -    for (KDOM::NodeImpl *n = firstChild(); n != 0; n = n->nextSibling())
  -    {
  +    for (KDOM::NodeImpl *n = firstChild(); n != 0; n = n->nextSibling()) {
           SVGElementImpl *element = svg_dynamic_cast(n);
           if (element && element->isValid())
               return (n == child); // Only allow this child if it's the first valid child
  
  
  
  1.6       +3 -2      SVGSupport/ksvg2/svg/SVGSwitchElementImpl.h
  
  Index: SVGSwitchElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGSwitchElementImpl.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SVGSwitchElementImpl.h	21 Nov 2005 08:29:42 -0000	1.5
  +++ SVGSwitchElementImpl.h	26 Nov 2005 22:35:49 -0000	1.6
  @@ -38,10 +38,11 @@
       public:
           SVGSwitchElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGSwitchElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
  -        // Derived from: 'SVGStyledElementImpl'
  -        virtual bool allowAttachChildren(KDOM::ElementImpl *child) const;
           virtual bool rendererIsNeeded(khtml::RenderStyle *) { return true; }
  +        virtual bool childShouldCreateRenderer(KDOM::NodeImpl *) const;
   
           virtual khtml::RenderObject *createRenderer(RenderArena *arena, khtml::RenderStyle *style);
   
  
  
  
  1.6       +1 -3      SVGSupport/ksvg2/svg/SVGSymbolElementImpl.h
  
  Index: SVGSymbolElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGSymbolElementImpl.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SVGSymbolElementImpl.h	21 Nov 2005 08:29:42 -0000	1.5
  +++ SVGSymbolElementImpl.h	26 Nov 2005 22:35:49 -0000	1.6
  @@ -40,9 +40,7 @@
           virtual ~SVGSymbolElementImpl();
   
           virtual void parseMappedAttribute(KDOM::MappedAttributeImpl *attr);
  -
  -        // Derived from: 'SVGStyledElementImpl'
  -        virtual bool allowAttachChildren(KDOM::ElementImpl *) const { return false; }
  +        virtual bool shouldAttachChild(KDOM::ElementImpl *) const { return false; }
       };
   };
   
  
  
  
  1.10      +11 -11    SVGSupport/ksvg2/svg/SVGTestsImpl.cpp
  
  Index: SVGTestsImpl.cpp
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGTestsImpl.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SVGTestsImpl.cpp	26 Nov 2005 22:19:17 -0000	1.9
  +++ SVGTestsImpl.cpp	26 Nov 2005 22:35:49 -0000	1.10
  @@ -90,17 +90,17 @@
   
   bool SVGTestsImpl::parseMappedAttribute(KDOM::MappedAttributeImpl *attr)
   {
  -//    KDOM::DOMString value(attr->value());
  -//    if (attr->name() == SVGNames::requiredfeaturesAttr) {
  -//        requiredFeatures()->reset(value.qstring());
  -//        return true;
  -//    } else if (attr->name() == SVGNames::requiredextensionsAttr) {
  -//        requiredExtensions()->reset(value.qstring());
  -//        return true;
  -//    } else if (attr->name() == SVGNames::systemlanguageAttr)
  -//        systemLanguage()->reset(value.qstring());
  -//        return true;
  -//    }
  +    KDOM::DOMString value(attr->value());
  +    if (attr->name() == SVGNames::requiredFeaturesAttr) {
  +        requiredFeatures()->reset(value.qstring());
  +        return true;
  +    } else if (attr->name() == SVGNames::requiredExtensionsAttr) {
  +        requiredExtensions()->reset(value.qstring());
  +        return true;
  +    } else if (attr->name() == SVGNames::systemLanguageAttr) {
  +        systemLanguage()->reset(value.qstring());
  +        return true;
  +    }
       
       return false;
   }
  
  
  
  1.7       +2 -0      SVGSupport/ksvg2/svg/SVGTextContentElementImpl.h
  
  Index: SVGTextContentElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGTextContentElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGTextContentElementImpl.h	26 Nov 2005 22:19:17 -0000	1.6
  +++ SVGTextContentElementImpl.h	26 Nov 2005 22:35:49 -0000	1.7
  @@ -43,6 +43,8 @@
       public:
           SVGTextContentElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGTextContentElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // 'SVGTextContentElement' functions
           SVGAnimatedLengthImpl *textLength() const;
  
  
  
  1.7       +2 -0      SVGSupport/ksvg2/svg/SVGUseElementImpl.h
  
  Index: SVGUseElementImpl.h
  ===================================================================
  RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGUseElementImpl.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SVGUseElementImpl.h	26 Nov 2005 22:19:18 -0000	1.6
  +++ SVGUseElementImpl.h	26 Nov 2005 22:35:49 -0000	1.7
  @@ -42,6 +42,8 @@
       public:
           SVGUseElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc);
           virtual ~SVGUseElementImpl();
  +        
  +        virtual bool isValid() const { return SVGTestsImpl::isValid(); }
   
           // Derived from: 'ElementImpl'
           virtual bool hasChildNodes() const;
  
  
  



More information about the webkit-changes mailing list