Bug 1244637 - implement AnimationEffectTiming fill. r=hiro
authorABE Hiroki (hATrayflood) <h.rayflood@gmail.com>
Sun, 10 Apr 2016 11:35:52 +0900
changeset 331419 f50694e2aa7c3685a53943e5732156789b31ef67
parent 331418 cd04bd37115c1eaba4fc53cf3cd62dd3167565f3
child 331420 dccef94b90f5e5ab50ca77f1e814c1df4f3a2e59
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1244637
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1244637 - implement AnimationEffectTiming fill. r=hiro MozReview-Commit-ID: 46kYkxy06Sk
dom/animation/AnimationEffectTiming.cpp
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/web-animations/animation-effect-timing/fill.html
--- a/dom/animation/AnimationEffectTiming.cpp
+++ b/dom/animation/AnimationEffectTiming.cpp
@@ -50,17 +50,22 @@ AnimationEffectTiming::SetEndDelay(doubl
   mTiming.mEndDelay = endDelay;
 
   PostSpecifiedTimingUpdated(mEffect);
 }
 
 void
 AnimationEffectTiming::SetFill(const FillMode& aFill)
 {
-  // TODO: Bug 1244637 - implement AnimationEffectTiming fill
+  if (mTiming.mFill == aFill) {
+    return;
+  }
+  mTiming.mFill = aFill;
+
+  PostSpecifiedTimingUpdated(mEffect);
 }
 
 void
 AnimationEffectTiming::SetIterationStart(double aIterationStart,
                                          ErrorResult& aRv)
 {
   if (mTiming.mIterationStart == aIterationStart) {
     return;
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -28749,16 +28749,20 @@
         "path": "web-animations/animation-effect-timing/easing.html",
         "url": "/web-animations/animation-effect-timing/easing.html"
       },
       {
         "path": "web-animations/animation-effect-timing/endDelay.html",
         "url": "/web-animations/animation-effect-timing/endDelay.html"
       },
       {
+        "path": "web-animations/animation-effect-timing/fill.html",
+        "url": "/web-animations/animation-effect-timing/fill.html"
+      },
+      {
         "path": "web-animations/animation-effect-timing/getAnimations.html",
         "url": "/web-animations/animation-effect-timing/getAnimations.html"
       },
       {
         "path": "web-animations/animation-effect-timing/getComputedStyle.html",
         "url": "/web-animations/animation-effect-timing/getComputedStyle.html"
       },
       {
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/web-animations/animation-effect-timing/fill.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>fill tests</title>
+<link rel="help" href="https://w3c.github.io/web-animations/#dom-animationeffecttiming-fill">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../testcommon.js"></script>
+<link rel="stylesheet" href="/resources/testharness.css">
+<body>
+<div id="log"></div>
+<script>
+'use strict';
+
+["none", "forwards", "backwards", "both", ].forEach(function(fill){
+  test(function(t) {
+    var div = createDiv(t);
+    var anim = div.animate({ opacity: [ 0, 1 ] }, 100);
+    anim.effect.timing.fill = fill;
+    assert_equals(anim.effect.timing.fill, fill, 'set fill ' + fill);
+    assert_equals(anim.effect.getComputedTiming().fill, fill, 'getComputedTiming() after set fill ' + fill);
+  }, 'set fill ' + fill);
+});
+
+</script>
+</body>