RESOLVED FIXED 224730
Fix interpolation of the rotate CSS property
https://bugs.webkit.org/show_bug.cgi?id=224730
Summary Fix interpolation of the rotate CSS property
Antoine Quint
Reported 2021-04-18 01:59:49 PDT
Fix interpolation of the rotate CSS property
Attachments
Patch (52.90 KB, patch)
2021-04-18 02:02 PDT, Antoine Quint
no flags
Patch (71.19 KB, patch)
2021-04-18 02:51 PDT, Antoine Quint
no flags
Patch for landing (71.24 KB, patch)
2021-04-18 10:04 PDT, Antoine Quint
no flags
Antoine Quint
Comment 1 2021-04-18 02:02:34 PDT
Antoine Quint
Comment 2 2021-04-18 02:51:18 PDT
Dean Jackson
Comment 3 2021-04-18 08:58:20 PDT
Comment on attachment 426376 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426376&action=review > Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp:66 > + auto x = static_cast<float>(op.m_x); > + auto y = static_cast<float>(op.m_y); > + auto z = static_cast<float>(op.m_z); > + auto length = std::hypot(x, y, z); > + return { x / length, y / length, z / length }; Use simd.h here. auto v = simd_make_float3(static_cast<float>(op.m_x), static_cast<float>(op.m_y), static_cast<float>(op.m_z)); auto normalized = simd_normalize(v); return { normalized.x, normalized.y, normalized.z }; Although you might also be able to use simd things through the whole function and avoid FloatPoint3D.
Dean Jackson
Comment 4 2021-04-18 08:58:53 PDT
simd stuff is apple-specific
Dean Jackson
Comment 5 2021-04-18 09:00:16 PDT
... maybe. other platforms might have versions. And I think it's becoming part of the C++ stdlib. Ask weinig.
Dean Jackson
Comment 6 2021-04-18 09:01:29 PDT
Another option would be to add a normalize fn to FloatPoint3D.
Antoine Quint
Comment 7 2021-04-18 09:43:36 PDT
(In reply to Dean Jackson from comment #6) > Another option would be to add a normalize fn to FloatPoint3D. There actually is one :)
Antoine Quint
Comment 8 2021-04-18 10:04:11 PDT
Created attachment 426379 [details] Patch for landing
EWS
Comment 9 2021-04-18 11:12:31 PDT
Committed r276231 (236713@main): <https://commits.webkit.org/236713@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426379 [details].
Radar WebKit Bug Importer
Comment 10 2021-04-24 15:05:50 PDT
Note You need to log in before you can comment on or make changes to this bug.