Changeset 230667 in webkit
- Timestamp:
- Apr 16, 2018 1:47:17 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r230665 r230667 1 2018-04-16 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Ensure we never return -0 through the API 4 https://bugs.webkit.org/show_bug.cgi?id=184644 5 6 Reviewed by Dean Jackson. 7 8 Record one progression in the Web Animations WPT tests. 9 10 * web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt: 11 1 12 2018-04-15 Antoine Quint <graouts@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt
r230665 r230667 5 5 PASS Updating the finished state when playing in reverse past zero 6 6 PASS Updating the finished state when seeking a reversed animation past zero 7 FAIL Updating the finished state when seeking a reversed animation exactly to zero assert_equals: Hold time is set so current time should NOT change expected 0 but got -0 7 PASS Updating the finished state when seeking a reversed animation exactly to zero 8 8 PASS Updating the finished state when playing before end 9 9 PASS Updating the finished state when seeking before end -
trunk/Source/WebCore/ChangeLog
r230665 r230667 1 2018-04-16 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Ensure we never return -0 through the API 4 https://bugs.webkit.org/show_bug.cgi?id=184644 5 6 Reviewed by Dean Jackson. 7 8 We could sometimes return -0 instead of 0, which is surprising and leads to an error in WPT tests. 9 This would happen when playbackRate < 0. 10 11 * animation/WebAnimationUtilities.h: 12 (WebCore::secondsToWebAnimationsAPITime): 13 1 14 2018-04-15 Antoine Quint <graouts@apple.com> 2 15 -
trunk/Source/WebCore/animation/WebAnimationUtilities.h
r229864 r230667 38 38 // agents be able to represent input time values with microsecond precision so that a time value (which nominally 39 39 // represents milliseconds) of 0.001 is distinguishable from 0.0. 40 return std::round(time.microseconds()) / 1000; 40 auto roundedTime = std::round(time.microseconds()) / 1000; 41 if (roundedTime == -0) 42 return 0; 43 return roundedTime; 41 44 } 42 45
Note: See TracChangeset
for help on using the changeset viewer.