Commit b4b4482e authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

[Code health] Remove blink::NullValue in core/animation--part1

This CL changes AnimationEffect::LocalTime to return a
base::Optional<double> instead of double, and so that we
can remove a usage of blink::NullValue.

Bug: 791086
Change-Id: I9908e70b5f5bb329b7fdf15d8d47e2f1973c6c8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2393071Reviewed-by: default avatarKevin Ellis <kevers@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805348}
parent aab3ae8a
...@@ -99,8 +99,8 @@ class CORE_EXPORT AnimationEffect : public ScriptWrappable { ...@@ -99,8 +99,8 @@ class CORE_EXPORT AnimationEffect : public ScriptWrappable {
AnimationTimeDelta TimeToReverseEffectChange() const { AnimationTimeDelta TimeToReverseEffectChange() const {
return EnsureCalculated().time_to_reverse_effect_change; return EnsureCalculated().time_to_reverse_effect_change;
} }
double LocalTime() const { base::Optional<double> LocalTime() const {
return EnsureCalculated().local_time.value_or(Timing::NullValue()); return EnsureCalculated().local_time;
} }
const Timing& SpecifiedTiming() const { return timing_; } const Timing& SpecifiedTiming() const { return timing_; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment