SVGTitleElement.cpp [plain text]
#include "config.h"
#include "SVGTitleElement.h"
#include "Document.h"
#include "SVGNames.h"
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
WTF_MAKE_ISO_ALLOCATED_IMPL(SVGTitleElement);
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::InsertedIntoAncestorResult SVGTitleElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
{
SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
document().titleElementAdded(*this);
return InsertedIntoAncestorResult::Done;
}
void SVGTitleElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
{
SVGElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
document().titleElementRemoved(*this);
}
void SVGTitleElement::childrenChanged(const ChildChange& change)
{
SVGElement::childrenChanged(change);
document().titleElementTextChanged(*this);
}
}