diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/svg/svg_graphics_element.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/svg/svg_graphics_element.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/core/svg/svg_graphics_element.h b/chromium/third_party/blink/renderer/core/svg/svg_graphics_element.h index 2b602085711..5fbcc82e5e2 100644 --- a/chromium/third_party/blink/renderer/core/svg/svg_graphics_element.h +++ b/chromium/third_party/blink/renderer/core/svg/svg_graphics_element.h @@ -64,7 +64,7 @@ class CORE_EXPORT SVGGraphicsElement : public SVGElement, public SVGTests { CTMScope mode, const SVGGraphicsElement* ancestor = nullptr) const; - void Trace(blink::Visitor*) override; + void Trace(Visitor*) override; protected: SVGGraphicsElement(const QualifiedName&, @@ -87,20 +87,21 @@ class CORE_EXPORT SVGGraphicsElement : public SVGElement, public SVGTests { bool IsSVGGraphicsElement() const final { return true; } }; -inline bool IsSVGGraphicsElement(const SVGElement& element) { - return element.IsSVGGraphicsElement(); +template <> +inline bool IsElementOfType<const SVGGraphicsElement>(const Node& node) { + return IsA<SVGGraphicsElement>(node); } - template <> struct DowncastTraits<SVGGraphicsElement> { static bool AllowFrom(const Node& node) { auto* svg_element = DynamicTo<SVGElement>(node); - return svg_element && IsSVGGraphicsElement(*svg_element); + return svg_element && AllowFrom(*svg_element); + } + static bool AllowFrom(const SVGElement& svg_element) { + return svg_element.IsSVGGraphicsElement(); } }; -DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement); - } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_SVG_SVG_GRAPHICS_ELEMENT_H_ |