This source file includes following definitions.
- create
- childrenChanged
#include "config.h"
#if ENABLE(SVG_FONTS)
#include "core/svg/SVGFontFaceFormatElement.h"
#include "SVGNames.h"
#include "core/svg/SVGFontFaceElement.h"
namespace WebCore {
using namespace SVGNames;
inline SVGFontFaceFormatElement::SVGFontFaceFormatElement(Document& document)
: SVGElement(font_face_formatTag, document)
{
ScriptWrappable::init(this);
}
PassRefPtr<SVGFontFaceFormatElement> SVGFontFaceFormatElement::create(Document& document)
{
return adoptRef(new SVGFontFaceFormatElement(document));
}
void SVGFontFaceFormatElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
if (!isSVGFontFaceUriElement(parentNode()))
return;
ContainerNode* ancestor = parentNode()->parentNode();
if (!isSVGFontFaceSrcElement(ancestor))
return;
ancestor = ancestor->parentNode();
if (isSVGFontFaceElement(ancestor))
toSVGFontFaceElement(ancestor)->rebuildFontFace();
}
}
#endif