Bug 181428

Summary: Refactor timing function solving code
Product: WebKit Reporter: Antoine Quint <graouts>
Component: New BugsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, darin, dino, dstockwell, ews-watchlist, kondapallykalyan, luiz, noam, rniwa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews103 for mac-elcapitan
none
Archive of layout-test-results from ews123 for ios-simulator-wk2
none
Patch dino: review+

Antoine Quint
Reported 2018-01-09 02:51:34 PST
Refactor timing function solving code
Attachments
Patch (14.34 KB, patch)
2018-01-09 02:54 PST, Antoine Quint
no flags
Patch (10.24 KB, patch)
2018-01-09 07:15 PST, Antoine Quint
no flags
Patch (11.19 KB, patch)
2018-01-09 07:18 PST, Antoine Quint
no flags
Archive of layout-test-results from ews103 for mac-elcapitan (2.29 MB, application/zip)
2018-01-09 08:24 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.35 MB, application/zip)
2018-01-09 08:50 PST, EWS Watchlist
no flags
Patch (10.48 KB, patch)
2018-01-09 08:54 PST, Antoine Quint
dino: review+
Antoine Quint
Comment 1 2018-01-09 02:54:49 PST
Antoine Quint
Comment 2 2018-01-09 07:15:54 PST
Antoine Quint
Comment 3 2018-01-09 07:18:34 PST
Darin Adler
Comment 4 2018-01-09 08:11:29 PST
Comment on attachment 330822 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=330822&action=review > Source/WebCore/platform/animation/TimingFunction.cpp:71 > + return std::min(1.0, (floor(m_steps * inputTime) + 1) / m_steps); Should use std::floor. > Source/WebCore/platform/animation/TimingFunction.cpp:72 > + return floor(m_steps * inputTime) / m_steps; Should use std::floor.
EWS Watchlist
Comment 5 2018-01-09 08:24:15 PST
Comment on attachment 330822 [details] Patch Attachment 330822 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/5998231 New failing tests: imported/w3c/web-platform-tests/css/css-ui-3/caret-color-021.html transitions/steps-timing-function.html animations/animation-direction-reverse-timing-functions.html animations/keyframe-multiple-timing-functions-transform.html animations/fill-mode-iteration-count-non-integer.html fast/css-generated-content/pseudo-animation.html animations/multiple-animations-timing-function.html animations/missing-keyframe-properties-timing-function.html fast/css-generated-content/pseudo-transition.html animations/spring-function.html transitions/default-timing-function.html transitions/transition-display-property-2.html animations/trigger-container-scroll-simple.html animations/animation-direction-reverse-timing-functions-hardware.html animations/timing-functions.html
EWS Watchlist
Comment 6 2018-01-09 08:24:17 PST
Created attachment 330825 [details] Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Darin Adler
Comment 7 2018-01-09 08:27:24 PST
Comment on attachment 330822 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=330822&action=review > Source/WebCore/platform/animation/TimingFunction.h:53 > + double transformTime(double inputTime, double) const { return inputTime; } Need to mark this virtual. > Source/WebCore/platform/animation/TimingFunction.h:160 > + double transformTime(double, double) const; Need to mark this final. > Source/WebCore/platform/animation/TimingFunction.h:210 > + double transformTime(double, double) const; Need to mark this final. > Source/WebCore/platform/animation/TimingFunction.h:264 > + double transformTime(double, double) const; Need to mark this final.
EWS Watchlist
Comment 8 2018-01-09 08:50:00 PST
Comment on attachment 330822 [details] Patch Attachment 330822 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/5998401 New failing tests: animations/multiple-animations-timing-function.html transitions/steps-timing-function.html fast/css-generated-content/pseudo-animation.html animations/keyframe-multiple-timing-functions-transform.html animations/fill-mode-iteration-count-non-integer.html animations/animation-direction-reverse-timing-functions.html imported/w3c/web-platform-tests/css/css-ui-3/caret-color-021.html fast/css-generated-content/pseudo-transition.html animations/spring-function.html transitions/transition-display-property-2.html animations/animation-direction-reverse-timing-functions-hardware.html animations/trigger-container-scroll-simple.html animations/animation-initial-inheritance.html animations/missing-keyframe-properties-timing-function.html animations/timing-functions.html
EWS Watchlist
Comment 9 2018-01-09 08:50:02 PST
Created attachment 330826 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Antoine Quint
Comment 10 2018-01-09 08:51:28 PST
(In reply to Darin Adler from comment #7) > Comment on attachment 330822 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=330822&action=review > > > Source/WebCore/platform/animation/TimingFunction.h:53 > > + double transformTime(double inputTime, double) const { return inputTime; } > > Need to mark this virtual. There was a linking issue with a virtual method here that I couldn't fix, even with the help of some fine folks on #webkit. I'm preparing a new patch where we use a single method on TimingFunction that downcasts based on the type.
Antoine Quint
Comment 11 2018-01-09 08:54:47 PST
Antoine Quint
Comment 12 2018-01-09 08:55:33 PST
(In reply to Darin Adler from comment #4) > Comment on attachment 330822 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=330822&action=review > > > Source/WebCore/platform/animation/TimingFunction.cpp:71 > > + return std::min(1.0, (floor(m_steps * inputTime) + 1) / m_steps); > > Should use std::floor. > > > Source/WebCore/platform/animation/TimingFunction.cpp:72 > > + return floor(m_steps * inputTime) / m_steps; > > Should use std::floor. The new patch uses std::floor.
Dean Jackson
Comment 13 2018-01-09 09:45:04 PST
Comment on attachment 330827 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=330827&action=review > Source/WebCore/platform/animation/TimingFunction.cpp:64 > + auto& function = *static_cast<const CubicBezierTimingFunction*>(this); Maybe we should have is<> and downcast<> for these? > Source/WebCore/platform/animation/TimingFunction.cpp:66 > + auto epsilon = 1.0 / (200.0 * duration); > + return UnitBezier(function.x1(), function.y1(), function.x2(), function.y2()).solve(inputTime, epsilon); Any reason you moved the epsilon to a variable? This means we no longer have the comment on why we change the accuracy for longer durations.
Antoine Quint
Comment 14 2018-01-09 09:55:28 PST
Antoine Quint
Comment 15 2018-01-09 09:56:35 PST
(In reply to Dean Jackson from comment #13) > Comment on attachment 330827 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=330827&action=review > > > Source/WebCore/platform/animation/TimingFunction.cpp:66 > > + auto epsilon = 1.0 / (200.0 * duration); > > + return UnitBezier(function.x1(), function.y1(), function.x2(), function.y2()).solve(inputTime, epsilon); > > Any reason you moved the epsilon to a variable? This means we no longer have > the comment on why we change the accuracy for longer durations. I added it back in the commit.
Radar WebKit Bug Importer
Comment 16 2018-01-09 09:56:36 PST
Note You need to log in before you can comment on or make changes to this bug.