Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / svg / SVGGlyphElement.cpp
index ace7f98..021f6d3 100644 (file)
 #include "core/svg/SVGFontElement.h"
 #include "core/svg/SVGPathUtilities.h"
 
-namespace WebCore {
+namespace blink {
 
 inline SVGGlyphElement::SVGGlyphElement(Document& document)
     : SVGElement(SVGNames::glyphTag, document)
 {
-    ScriptWrappable::init(this);
 }
 
-PassRefPtr<SVGGlyphElement> SVGGlyphElement::create(Document& document)
-{
-    return adoptRef(new SVGGlyphElement(document));
-}
+DEFINE_NODE_FACTORY(SVGGlyphElement)
 
 void SVGGlyphElement::invalidateGlyphCache()
 {
     ContainerNode* fontNode = parentNode();
-    if (fontNode && fontNode->hasTagName(SVGNames::fontTag))
-        toSVGFontElement(fontNode)->invalidateGlyphCache();
+    if (isSVGFontElement(fontNode))
+        toSVGFontElement(*fontNode).invalidateGlyphCache();
 }
 
 void SVGGlyphElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -108,7 +104,7 @@ void SVGGlyphElement::inheritUnspecifiedAttributes(SVGGlyph& identifier, const S
         identifier.verticalAdvanceY = svgFontData->verticalAdvanceY();
 }
 
-static inline float parseSVGGlyphAttribute(const SVGElement* element, const WebCore::QualifiedName& name)
+static inline float parseSVGGlyphAttribute(const SVGElement* element, const blink::QualifiedName& name)
 {
     AtomicString value(element->fastGetAttribute(name));
     if (value.isEmpty())