SVGTitleElement.cpp [plain text]
#include "config.h"
#include "SVGTitleElement.h"
#include "Document.h"
#include "SVGNames.h"
#include "Text.h"
namespace WebCore {
inline SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document& document)
: SVGElement(tagName, document)
{
ASSERT(hasTagName(SVGNames::titleTag));
}
Ref<SVGTitleElement> SVGTitleElement::create(const QualifiedName& tagName, Document& document)
{
return adoptRef(*new SVGTitleElement(tagName, document));
}
Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode& rootParent)
{
SVGElement::insertedInto(rootParent);
if (!rootParent.isConnected())
return InsertionDone;
if (firstChild() && document().isSVGDocument())
document().titleElementAdded(*this);
return InsertionDone;
}
void SVGTitleElement::removedFrom(ContainerNode& rootParent)
{
SVGElement::removedFrom(rootParent);
if (rootParent.isConnected() && document().isSVGDocument())
document().titleElementRemoved(*this);
}
void SVGTitleElement::childrenChanged(const ChildChange& change)
{
SVGElement::childrenChanged(change);
document().titleElementTextChanged(*this);
}
}