Title: [234166] trunk/Source/WebCore
Revision
234166
Author
grao...@webkit.org
Date
2018-07-24 12:35:36 -0700 (Tue, 24 Jul 2018)

Log Message

[Web Animations] Add an ASSERT() to check the contract that a CSSTransition has a valid effect in setTimingProperties()
https://bugs.webkit.org/show_bug.cgi?id=187954

Reviewed by Dean Jackson.

* animation/CSSTransition.cpp:
(WebCore::CSSTransition::setTimingProperties):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234165 => 234166)


--- trunk/Source/WebCore/ChangeLog	2018-07-24 19:32:10 UTC (rev 234165)
+++ trunk/Source/WebCore/ChangeLog	2018-07-24 19:35:36 UTC (rev 234166)
@@ -1,5 +1,15 @@
 2018-07-24  Antoine Quint  <grao...@apple.com>
 
+        [Web Animations] Add an ASSERT() to check the contract that a CSSTransition has a valid effect in setTimingProperties()
+        https://bugs.webkit.org/show_bug.cgi?id=187954
+
+        Reviewed by Dean Jackson.
+
+        * animation/CSSTransition.cpp:
+        (WebCore::CSSTransition::setTimingProperties):
+
+2018-07-24  Antoine Quint  <grao...@apple.com>
+
         [Web Animations] Crash when setting an animation style on an existing animation that had its effect set to null
         https://bugs.webkit.org/show_bug.cgi?id=187953
 

Modified: trunk/Source/WebCore/animation/CSSTransition.cpp (234165 => 234166)


--- trunk/Source/WebCore/animation/CSSTransition.cpp	2018-07-24 19:32:10 UTC (rev 234165)
+++ trunk/Source/WebCore/animation/CSSTransition.cpp	2018-07-24 19:35:36 UTC (rev 234166)
@@ -60,10 +60,13 @@
 {
     suspendEffectInvalidation();
 
+    // This method is only called from CSSTransition::create() where we're guaranteed to have an effect.
+    ASSERT(effect());
+
     auto* timing = effect()->timing();
+
     // In order for CSS Transitions to be seeked backwards, they need to have their fill mode set to backwards
     // such that the original CSS value applied prior to the transition is used for a negative current time.
-    
     timing->setFill(FillMode::Backwards);
     timing->setDelay(delay);
     timing->setIterationDuration(duration);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to