RESOLVED FIXED Bug 230404
[Web Animations] Add support for composite operations for software animations
https://bugs.webkit.org/show_bug.cgi?id=230404
Summary [Web Animations] Add support for composite operations for software animations
Antoine Quint
Reported 2021-09-17 07:00:03 PDT
[Web Animations] Add support for composite operations for software animations
Attachments
Patch for EWS (786.75 KB, patch)
2021-09-17 07:00 PDT, Antoine Quint
no flags
Patch for EWS (789.28 KB, patch)
2021-09-17 12:08 PDT, Antoine Quint
no flags
Patch for EWS (797.79 KB, patch)
2021-09-20 03:13 PDT, Antoine Quint
no flags
Patch for EWS (797.67 KB, patch)
2021-09-20 03:24 PDT, Antoine Quint
no flags
Patch for EWS (789.69 KB, patch)
2021-10-19 03:52 PDT, Antoine Quint
no flags
Patch for EWS (792.21 KB, patch)
2021-10-19 06:04 PDT, Antoine Quint
no flags
Patch for EWS (794.04 KB, patch)
2021-10-20 04:49 PDT, Antoine Quint
no flags
Patch for EWS (792.69 KB, patch)
2021-10-20 04:57 PDT, Antoine Quint
no flags
Patch for EWS (801.16 KB, patch)
2021-10-21 00:18 PDT, Antoine Quint
no flags
Patch (780.58 KB, patch)
2021-10-21 08:16 PDT, Antoine Quint
no flags
Patch (780.71 KB, patch)
2021-10-21 08:25 PDT, Antoine Quint
dino: review+
Patch for landing (780.91 KB, patch)
2021-10-22 00:52 PDT, Antoine Quint
ews-feeder: commit-queue-
Patch for landing (784.51 KB, patch)
2021-10-22 10:23 PDT, Antoine Quint
no flags
Patch for landing (784.81 KB, patch)
2021-11-08 00:32 PST, Antoine Quint
ews-feeder: commit-queue-
Antoine Quint
Comment 1 2021-09-17 07:00:55 PDT
Created attachment 438469 [details] Patch for EWS
Antoine Quint
Comment 2 2021-09-17 12:08:20 PDT
Created attachment 438499 [details] Patch for EWS
Antoine Quint
Comment 3 2021-09-20 03:13:54 PDT
Created attachment 438651 [details] Patch for EWS
Antoine Quint
Comment 4 2021-09-20 03:24:44 PDT
Created attachment 438652 [details] Patch for EWS
Radar WebKit Bug Importer
Comment 5 2021-09-24 07:01:25 PDT
Antoine Quint
Comment 6 2021-10-19 03:52:03 PDT
Created attachment 441708 [details] Patch for EWS
Antoine Quint
Comment 7 2021-10-19 06:04:47 PDT
Created attachment 441716 [details] Patch for EWS
Antoine Quint
Comment 8 2021-10-20 04:49:54 PDT
Created attachment 441867 [details] Patch for EWS
Antoine Quint
Comment 9 2021-10-20 04:57:17 PDT
Created attachment 441868 [details] Patch for EWS
Antoine Quint
Comment 10 2021-10-21 00:18:31 PDT
Created attachment 441992 [details] Patch for EWS
Antoine Quint
Comment 11 2021-10-21 08:16:25 PDT
Antoine Quint
Comment 12 2021-10-21 08:25:32 PDT
Dean Jackson
Comment 13 2021-10-21 08:58:00 PDT
Comment on attachment 442027 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442027&action=review > Source/WebCore/animation/CSSPropertyAnimation.cpp:1343 > + shadow = shadow ? shadow->next() : 0; nullptr instead of 0 > Source/WebCore/animation/CSSPropertyAnimation.cpp:1388 > + shadow = shadow ? shadow->next() : 0; ditto Also, why not make this a static function so you don't need to duplicate it? > Source/WebCore/platform/animation/AnimationUtilities.h:57 > + return static_cast<unsigned>(lround(to > from ? static_cast<double>(from) + static_cast<double>(to - from) * context.progress : static_cast<double>(from) - static_cast<double>(from - to) * context.progress)); to > from ? from + (to-from) * p : from - (from-to) * p to > from ? from + to*p - from*p : from - from*p + to*p to > from ? from + to*p - from*p : from + to*p - from*p Aren't both sides the same? This explains why you don't check for to > from in the other blends. > Source/WebCore/platform/graphics/transforms/AffineTransform.cpp:387 > + if (compositeOperation != CompositeOperation::Replace) { I think it might be more understandable if you explicitly test for Add or Accumulate > Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp:63 > - FloatPoint3D vector { static_cast<float>(op.m_x), static_cast<float>(op.m_y), static_cast<float>(op.m_z) }; > - vector.normalize(); > - return vector; > + auto length = std::hypot(op.m_x, op.m_y, op.m_z); > + return { static_cast<float>(op.m_x / length), static_cast<float>(op.m_y / length), static_cast<float>(op.m_z / length) }; Seems unrelated, but fine. > Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:1641 > + if (from != to) Don't think you need this test.
Antoine Quint
Comment 14 2021-10-21 11:29:59 PDT
(In reply to Dean Jackson from comment #13) > Comment on attachment 442027 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=442027&action=review > > > Source/WebCore/animation/CSSPropertyAnimation.cpp:1343 > > + shadow = shadow ? shadow->next() : 0; > > nullptr instead of 0 > > > Source/WebCore/animation/CSSPropertyAnimation.cpp:1388 > > + shadow = shadow ? shadow->next() : 0; > > ditto Will fix in commit. > Also, why not make this a static function so you don't need to duplicate it? I'll definitely look into that. > > Source/WebCore/platform/animation/AnimationUtilities.h:57 > > + return static_cast<unsigned>(lround(to > from ? static_cast<double>(from) + static_cast<double>(to - from) * context.progress : static_cast<double>(from) - static_cast<double>(from - to) * context.progress)); > > to > from ? from + (to-from) * p : from - (from-to) * p > to > from ? from + to*p - from*p : from - from*p + to*p > to > from ? from + to*p - from*p : from + to*p - from*p > > Aren't both sides the same? They are! Will fix in commit. > > Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:1641 > > + if (from != to) > > Don't think you need this test. Correct, will fix in commit.
Antoine Quint
Comment 15 2021-10-22 00:52:03 PDT
Created attachment 442130 [details] Patch for landing
Antoine Quint
Comment 16 2021-10-22 00:53:01 PDT
(In reply to Antoine Quint from comment #14) > (In reply to Dean Jackson from comment #13) > > Comment on attachment 442027 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=442027&action=review > > > > > Source/WebCore/animation/CSSPropertyAnimation.cpp:1343 > > > + shadow = shadow ? shadow->next() : 0; > > > > Also, why not make this a static function so you don't need to duplicate it? > > I'll definitely look into that. I've looked into it and addressed it in the patch for landing.
Antoine Quint
Comment 17 2021-10-22 10:23:42 PDT
Created attachment 442176 [details] Patch for landing
Antoine Quint
Comment 18 2021-11-08 00:32:47 PST
Created attachment 443528 [details] Patch for landing
Antoine Quint
Comment 19 2021-11-08 03:35:11 PST
Arcady Goldmints-Orlov
Comment 20 2021-11-30 07:56:53 PST
*** Bug 224738 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.