From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/svg/SVGFontFaceSrcElement.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Source/WebCore/svg/SVGFontFaceSrcElement.cpp') 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::create(const QualifiedName& tagName, Document& document) +Ref SVGFontFaceSrcElement::create(const QualifiedName& tagName, Document& document) { - return adoptRef(new SVGFontFaceSrcElement(tagName, document)); + return adoptRef(*new SVGFontFaceSrcElement(tagName, document)); } -PassRefPtr SVGFontFaceSrcElement::srcValue() const +Ref SVGFontFaceSrcElement::srcValue() const { - RefPtr list = CSSValueList::createCommaSeparated(); + Ref list = CSSValueList::createCommaSeparated(); for (auto& child : childrenOfType(*this)) { RefPtr srcValue; - if (isSVGFontFaceUriElement(child)) - srcValue = toSVGFontFaceUriElement(child).srcValue(); - else if (isSVGFontFaceNameElement(child)) - srcValue = toSVGFontFaceNameElement(child).srcValue(); + if (is(child)) + srcValue = downcast(child).srcValue(); + else if (is(child)) + srcValue = downcast(child).srcValue(); if (srcValue && srcValue->resource().length()) - list->append(srcValue.release()); + list->append(srcValue.releaseNonNull()); } return list; } @@ -63,8 +63,8 @@ PassRefPtr SVGFontFaceSrcElement::srcValue() const void SVGFontFaceSrcElement::childrenChanged(const ChildChange& change) { SVGElement::childrenChanged(change); - if (parentNode() && parentNode()->hasTagName(font_faceTag)) - toSVGFontFaceElement(parentNode())->rebuildFontFace(); + if (is(parentNode())) + downcast(*parentNode()).rebuildFontFace(); } } -- cgit v1.2.1