[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/khtml-svg/svg
From: Nikolas Zimmermann <wildfox () kde ! org>
Date: 2006-03-24 19:35:09
Message-ID: 1143228909.999633.13347.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 522228 by wildfox:
Commit SVGSVGElementImpl
M +1 -0 Makefile.am
M +8 -6 SVGElementImpl.cpp
M +2 -5 SVGElementImpl.h
M +2 -0 SVGLangSpaceImpl.h
A SVGSVGElementImpl.cpp [License: LGPL (v2+) (wrong address)]
A SVGSVGElementImpl.h [License: LGPL (v2+) (wrong address)]
--- branches/work/khtml-svg/svg/Makefile.am #522227:522228
@@ -18,4 +18,5 @@
SVGAnimatedStringImpl.cpp SVGZoomAndPanImpl.cpp SVGFitToViewBoxImpl.cpp \
SVGLocatableImpl.cpp SVGURIReferenceImpl.cpp SVGTransformableImpl.cpp \
SVGStyledLocatableElementImpl.cpp SVGStyledTransformableElementImpl.cpp \
+ SVGSVGElementImpl.cpp \
svgpathparser.cpp
--- branches/work/khtml-svg/svg/SVGElementImpl.cpp #522227:522228
@@ -26,6 +26,7 @@
#include "misc/htmlattrs.h"
#include "SVGElementImpl.h"
+#include "SVGSVGElementImpl.h"
using namespace KSVG;
@@ -69,13 +70,12 @@
exceptionCode = DOM::DOMException::NO_MODIFICATION_ALLOWED_ERR;
}
-/* FIXME
SVGSVGElementImpl *SVGElementImpl::ownerSVGElement() const
{
NodeImpl *n = parentNode();
while(n)
{
- if(n->nodeType() == DOM::Node::ELEMENT_NODE && \
n->hasTagName(SVGNames::svgTag)) + if(n->nodeType() == DOM::Node::ELEMENT_NODE \
&& n->id() == SVGID_SVG) return static_cast<SVGSVGElementImpl *>(n);
n = n->parentNode();
@@ -83,7 +83,7 @@
return 0;
}
-*/
+
SVGElementImpl *SVGElementImpl::viewportElement() const
{
NodeImpl *n = parentNode();
@@ -99,11 +99,13 @@
return 0;
}
-DOM::DOMString SVGElementImpl::tryGetAttribute(const DOM::DOMString &name, const \
DOM::DOMString &defaultValue) +DOM::DOMString SVGElementImpl::tryGetAttribute(const \
DOM::DOMString &name, const DOM::DOMString &defaultValue) const {
- if(hasAttribute(name))
- return getAttribute(name);
+ SVGElementImpl *that = const_cast<SVGElementImpl *>(this);
+ if(that->hasAttribute(name))
+ return that->getAttribute(name);
+
return defaultValue;
}
--- branches/work/khtml-svg/svg/SVGElementImpl.h #522227:522228
@@ -27,9 +27,8 @@
namespace KSVG
{
-/*
class SVGSVGElementImpl;
-*/
+
class SVGElementImpl : public DOM::ElementImpl
{
public:
@@ -45,13 +44,11 @@
DOM::DOMString xmlbase() const;
void setXmlbase(const DOM::DOMString &, int &exceptionCode);
-/* FIXME
SVGSVGElementImpl *ownerSVGElement() const;
-*/
SVGElementImpl *viewportElement() const;
// Helper methods that returns the attr value if attr is set, otherwise the \
default value.
- DOM::DOMString tryGetAttribute(const DOM::DOMString &name, const \
DOM::DOMString &defaultValue = DOM::DOMString()); + DOM::DOMString \
tryGetAttribute(const DOM::DOMString &name, const DOM::DOMString &defaultValue = \
DOM::DOMString()) const;
// Internal
virtual void parseAttribute(DOM::AttributeImpl *attr);
--- branches/work/khtml-svg/svg/SVGLangSpaceImpl.h #522227:522228
@@ -23,6 +23,8 @@
#ifndef KSVG_SVGLangSpaceImpl_H
#define KSVG_SVGLangSpaceImpl_H
+#include "dom/dom_string.h"
+
namespace DOM
{
class AttributeImpl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic