Fix IsCurrent to return after-phase animations with negative playback rate

See https://drafts.csswg.org/web-animations-1/#current

Bug: 1005852
Change-Id: I76390e0bc99078b5c1644970ef1985492414e6e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814638
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699779}
diff --git a/third_party/blink/renderer/core/animation/timing.cc b/third_party/blink/renderer/core/animation/timing.cc
index 63c25d4a..ade75c7 100644
--- a/third_party/blink/renderer/core/animation/timing.cc
+++ b/third_party/blink/renderer/core/animation/timing.cc
@@ -223,7 +223,9 @@
   // https://drafts.csswg.org/web-animations-1/#current
   calculated.is_current = calculated.is_in_play ||
                           (playback_rate.has_value() && playback_rate > 0 &&
-                           calculated.phase == Timing::kPhaseBefore);
+                           calculated.phase == Timing::kPhaseBefore) ||
+                          (playback_rate.has_value() && playback_rate < 0 &&
+                           calculated.phase == Timing::kPhaseAfter);
   calculated.local_time = local_time;
   calculated.time_to_next_iteration = time_to_next_iteration;
 
diff --git a/third_party/blink/web_tests/external/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt b/third_party/blink/web_tests/external/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt
index 35c5a82..eef153d 100644
--- a/third_party/blink/web_tests/external/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt
+++ b/third_party/blink/web_tests/external/wpt/web-animations/interfaces/Animatable/getAnimations-expected.txt
@@ -12,7 +12,7 @@
 PASS Returns animations yet to reach their active phase
 PASS Does not return reversed finished animations that do not fill backwards
 PASS Returns reversed finished animations that fill backwards
-FAIL Returns reversed animations yet to reach their active phase assert_array_equals: lengths differ, expected 1 got 0
+PASS Returns reversed animations yet to reach their active phase
 PASS Does not return animations with zero playback rate in before phase
 PASS Does not return animations with zero playback rate in after phase
 PASS Returns animations based on dynamic changes to individual animations' duration