summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGFontFaceSrcElement.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/svg/SVGFontFaceSrcElement.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/svg/SVGFontFaceSrcElement.cpp')
-rw-r--r--Source/WebCore/svg/SVGFontFaceSrcElement.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/WebCore/svg/SVGFontFaceSrcElement.cpp b/Source/WebCore/svg/SVGFontFaceSrcElement.cpp
index 4848bc2b7..d6b934142 100644
--- a/Source/WebCore/svg/SVGFontFaceSrcElement.cpp
+++ b/Source/WebCore/svg/SVGFontFaceSrcElement.cpp
@@ -40,22 +40,22 @@ inline SVGFontFaceSrcElement::SVGFontFaceSrcElement(const QualifiedName& tagName
ASSERT(hasTagName(font_face_srcTag));
}
-PassRefPtr<SVGFontFaceSrcElement> SVGFontFaceSrcElement::create(const QualifiedName& tagName, Document& document)
+Ref<SVGFontFaceSrcElement> SVGFontFaceSrcElement::create(const QualifiedName& tagName, Document& document)
{
- return adoptRef(new SVGFontFaceSrcElement(tagName, document));
+ return adoptRef(*new SVGFontFaceSrcElement(tagName, document));
}
-PassRefPtr<CSSValueList> SVGFontFaceSrcElement::srcValue() const
+Ref<CSSValueList> SVGFontFaceSrcElement::srcValue() const
{
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ Ref<CSSValueList> list = CSSValueList::createCommaSeparated();
for (auto& child : childrenOfType<SVGElement>(*this)) {
RefPtr<CSSFontFaceSrcValue> srcValue;
- if (isSVGFontFaceUriElement(child))
- srcValue = toSVGFontFaceUriElement(child).srcValue();
- else if (isSVGFontFaceNameElement(child))
- srcValue = toSVGFontFaceNameElement(child).srcValue();
+ if (is<SVGFontFaceUriElement>(child))
+ srcValue = downcast<SVGFontFaceUriElement>(child).srcValue();
+ else if (is<SVGFontFaceNameElement>(child))
+ srcValue = downcast<SVGFontFaceNameElement>(child).srcValue();
if (srcValue && srcValue->resource().length())
- list->append(srcValue.release());
+ list->append(srcValue.releaseNonNull());
}
return list;
}
@@ -63,8 +63,8 @@ PassRefPtr<CSSValueList> SVGFontFaceSrcElement::srcValue() const
void SVGFontFaceSrcElement::childrenChanged(const ChildChange& change)
{
SVGElement::childrenChanged(change);
- if (parentNode() && parentNode()->hasTagName(font_faceTag))
- toSVGFontFaceElement(parentNode())->rebuildFontFace();
+ if (is<SVGFontFaceElement>(parentNode()))
+ downcast<SVGFontFaceElement>(*parentNode()).rebuildFontFace();
}
}