Bug 255368 - Bring slerp interpolation in line with spec
Summary: Bring slerp interpolation in line with spec
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 250970
  Show dependency treegraph
 
Reported: 2023-04-12 15:14 PDT by Ahmad Saleem
Modified: 2023-10-12 18:36 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-04-12 15:14:18 PDT
Hi Team,

Based on discussion with @graouts on Slack 1-1, I am creating this bug report about potential Blink commit merge:

Commit - https://chromium.googlesource.com/chromium/blink/+/f550639338aaaa3abf07b88997609a396fb5cfad

Spec Discussion Link - http://lists.w3.org/Archives/Public/www-style/2013May/0131.html

``` Commit Message ```

The slerp function to interpolate between two quaternions (when blending two
decomposed matrices) does not match the spec. Although it may be desirable for
the interpolation to occur along the shortest path (as discussed in issue
14983004 and http://lists.w3.org/Archives/Public/www-style/2013May/0131.html),
the spec has not been changed as requested there. So this updates the WebKit
implementation to be in line with the spec.

______________________

Just wanted to raise for any input and also it is possible to do 1-1 merge, I did it in local testing branch few weeks back.

Thanks!
Comment 1 Ahmad Saleem 2023-04-12 15:21:46 PDT
Blink regressed this: Safari was doing correctly due to relying on system for doing animations (but if we are planning to change, we might have same bug):

After this change, will Blink match Safari?
If not, Safari can't change its behavior since it relies on the operation
system to do animations...

___________________

Test Case mentioned in the Spec Discussion - https://jsfiddle.net/bpLx7gtq/show

_____________________

Blink regressed it here (as per documentation):

I think so, yes.  We got the "bad" behavior when we switched from
WebCore::TransformationMatrix to gfx::Transform, according to
<https://code.google.com/p/chromium/issues/detail?id=236018>.  A quick
test in Safari with the example code in my first post has it doing the
short-path animation.

_________

Another test case - https://jsfiddle.net/f2hxo9k6/
Comment 2 Radar WebKit Bug Importer 2023-04-19 15:15:20 PDT
<rdar://problem/108283899>
Comment 3 Ahmad Saleem 2023-10-04 12:23:21 PDT
This might be Not Applicable after Matt's changes and moving this function (slerp) to 'Quaternion.cpp' here:

https://github.com/WebKit/WebKit/blob/53dd791f052cd7ee77e99c492a0b480166fb12b0/Source/WebCore/platform/graphics/transforms/Quaternion.cpp#L36

@Matt - can we close this?
Comment 4 Matt Woodrow 2023-10-12 18:36:47 PDT
I think we can close this, we should indeed have the changes already.