Commit 3353029e authored by darin's avatar darin

Reviewed by Darin.

        Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5351:
        SVG: Safari ignores <title> elements

        Make SVGTitleElementImpl act the same as HTMLTitleElementImpl,
        in the process setting the title on the right triggers.

        * ksvg2/svg/SVGTitleElementImpl.cpp:
        (SVGTitleElementImpl::SVGTitleElementImpl):
        (SVGTitleElementImpl::title):
        (SVGTitleElementImpl::closeRenderer):
        (SVGTitleElementImpl::insertedIntoDocument):
        (SVGTitleElementImpl::removedFromDocument):
        (SVGTitleElementImpl::childrenChanged):
        * ksvg2/svg/SVGTitleElementImpl.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5a082425
2006-03-15 Rob Buis <buis@kde.org>
Reviewed by Darin.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5351:
SVG: Safari ignores <title> elements
Make SVGTitleElementImpl act the same as HTMLTitleElementImpl,
in the process setting the title on the right triggers.
* ksvg2/svg/SVGTitleElementImpl.cpp:
(SVGTitleElementImpl::SVGTitleElementImpl):
(SVGTitleElementImpl::title):
(SVGTitleElementImpl::closeRenderer):
(SVGTitleElementImpl::insertedIntoDocument):
(SVGTitleElementImpl::removedFromDocument):
(SVGTitleElementImpl::childrenChanged):
* ksvg2/svg/SVGTitleElementImpl.h:
2006-03-18 Darin Adler <darin@apple.com>
- another try at fixing Windows build
......@@ -24,21 +24,47 @@
#if SVG_SUPPORT
#include "SVGTitleElementImpl.h"
using namespace WebCore;
#include "DocumentImpl.h"
SVGTitleElementImpl::SVGTitleElementImpl(const QualifiedName& tagName, DocumentImpl *doc) : SVGStyledElementImpl(tagName, doc), SVGLangSpaceImpl()
namespace WebCore {
SVGTitleElementImpl::SVGTitleElementImpl(const QualifiedName& tagName, DocumentImpl *doc)
: SVGStyledElementImpl(tagName, doc)
{
}
SVGTitleElementImpl::~SVGTitleElementImpl()
String SVGTitleElementImpl::title() const
{
return textContent();
}
DOMString SVGTitleElementImpl::title() const
void SVGTitleElementImpl::closeRenderer()
{
return textContent();
SVGStyledElementImpl::closeRenderer();
getDocument()->setTitle(textContent(), this);
}
void SVGTitleElementImpl::insertedIntoDocument()
{
SVGStyledElementImpl::insertedIntoDocument();
if (firstChild())
getDocument()->setTitle(textContent(), this);
}
void SVGTitleElementImpl::removedFromDocument()
{
SVGElementImpl::removedFromDocument();
getDocument()->removeTitle(this);
}
void SVGTitleElementImpl::childrenChanged()
{
SVGElementImpl::childrenChanged();
if (inDocument())
getDocument()->setTitle(textContent(), this);
}
}
// vim:ts=4:noet
#endif // SVG_SUPPORT
......@@ -34,9 +34,13 @@ namespace WebCore
{
public:
SVGTitleElementImpl(const QualifiedName& tagName, DocumentImpl *doc);
virtual ~SVGTitleElementImpl();
DOMString title() const;
String title() const;
virtual void closeRenderer();
virtual void insertedIntoDocument();
virtual void removedFromDocument();
virtual void childrenChanged();
};
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment