diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/animation/keyframe_effect.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/animation/keyframe_effect.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/chromium/third_party/blink/renderer/core/animation/keyframe_effect.h b/chromium/third_party/blink/renderer/core/animation/keyframe_effect.h index 7e880f50f65..ea23ee7f945 100644 --- a/chromium/third_party/blink/renderer/core/animation/keyframe_effect.h +++ b/chromium/third_party/blink/renderer/core/animation/keyframe_effect.h @@ -31,7 +31,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_KEYFRAME_EFFECT_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_KEYFRAME_EFFECT_H_ -#include "base/optional.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/blink/renderer/bindings/core/v8/script_value.h" #include "third_party/blink/renderer/core/animation/animation_effect.h" #include "third_party/blink/renderer/core/animation/compositor_animations.h" @@ -47,6 +47,7 @@ class KeyframeEffectModelBase; class PaintArtifactCompositor; class SampledEffect; class UnrestrictedDoubleOrKeyframeEffectOptions; +class V8UnionKeyframeEffectOptionsOrUnrestrictedDouble; // Represents the effect of an Animation on an Element's properties. // https://drafts.csswg.org/web-animations/#keyframe-effect @@ -57,12 +58,21 @@ class CORE_EXPORT KeyframeEffect final : public AnimationEffect { enum Priority { kDefaultPriority, kTransitionPriority }; // Web Animations API Bindings constructors. +#if defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION) + static KeyframeEffect* Create( + ScriptState* script_state, + Element* element, + const ScriptValue& keyframes, + const V8UnionKeyframeEffectOptionsOrUnrestrictedDouble* options, + ExceptionState& exception_state); +#else // defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION) static KeyframeEffect* Create( ScriptState*, Element*, const ScriptValue&, const UnrestrictedDoubleOrKeyframeEffectOptions&, ExceptionState&); +#endif // defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION) static KeyframeEffect* Create(ScriptState*, Element*, const ScriptValue&, @@ -116,7 +126,7 @@ class CORE_EXPORT KeyframeEffect final : public AnimationEffect { PropertyHandleSet* unsupported_properties = nullptr) const; // Must only be called once. void StartAnimationOnCompositor(int group, - base::Optional<double> start_time, + absl::optional<double> start_time, base::TimeDelta time_offset, double animation_playback_rate, CompositorAnimation* = nullptr); @@ -162,7 +172,7 @@ class CORE_EXPORT KeyframeEffect final : public AnimationEffect { void CountAnimatedProperties() const; AnimationTimeDelta CalculateTimeToEffectChange( bool forwards, - base::Optional<double> inherited_time, + absl::optional<AnimationTimeDelta> inherited_time, AnimationTimeDelta time_to_next_iteration) const override; bool HasIncompatibleStyle() const; bool HasMultipleTransformProperties() const; @@ -180,7 +190,7 @@ class CORE_EXPORT KeyframeEffect final : public AnimationEffect { bool ignore_css_keyframes_; - base::Optional<FloatSize> effect_target_size_; + absl::optional<FloatSize> effect_target_size_; }; template <> |