summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/animation/string_keyframe.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/animation/string_keyframe.h')
-rw-r--r--chromium/third_party/blink/renderer/core/animation/string_keyframe.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/chromium/third_party/blink/renderer/core/animation/string_keyframe.h b/chromium/third_party/blink/renderer/core/animation/string_keyframe.h
index 87c9a03937c..31cdb962583 100644
--- a/chromium/third_party/blink/renderer/core/animation/string_keyframe.h
+++ b/chromium/third_party/blink/renderer/core/animation/string_keyframe.h
@@ -194,21 +194,24 @@ class CORE_EXPORT StringKeyframe : public Keyframe {
using CSSPropertySpecificKeyframe = StringKeyframe::CSSPropertySpecificKeyframe;
using SVGPropertySpecificKeyframe = StringKeyframe::SVGPropertySpecificKeyframe;
-DEFINE_TYPE_CASTS(StringKeyframe,
- Keyframe,
- value,
- value->IsStringKeyframe(),
- value.IsStringKeyframe());
-DEFINE_TYPE_CASTS(CSSPropertySpecificKeyframe,
- Keyframe::PropertySpecificKeyframe,
- value,
- value->IsCSSPropertySpecificKeyframe(),
- value.IsCSSPropertySpecificKeyframe());
-DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe,
- Keyframe::PropertySpecificKeyframe,
- value,
- value->IsSVGPropertySpecificKeyframe(),
- value.IsSVGPropertySpecificKeyframe());
+template <>
+struct DowncastTraits<StringKeyframe> {
+ static bool AllowFrom(const Keyframe& value) {
+ return value.IsStringKeyframe();
+ }
+};
+template <>
+struct DowncastTraits<CSSPropertySpecificKeyframe> {
+ static bool AllowFrom(const Keyframe::PropertySpecificKeyframe& value) {
+ return value.IsCSSPropertySpecificKeyframe();
+ }
+};
+template <>
+struct DowncastTraits<SVGPropertySpecificKeyframe> {
+ static bool AllowFrom(const Keyframe::PropertySpecificKeyframe& value) {
+ return value.IsSVGPropertySpecificKeyframe();
+ }
+};
} // namespace blink