WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 236480
[css-transforms] properly handle interpolation of non-invertible matrices
https://bugs.webkit.org/show_bug.cgi?id=236480
Summary
[css-transforms] properly handle interpolation of non-invertible matrices
Nikos Mouchtaris
Reported
2022-02-10 19:25:38 PST
Web animations- properly handle interpolation of non-invertible matrices
Attachments
Patch
(16.10 KB, patch)
2022-02-10 19:32 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(16.27 KB, patch)
2022-02-10 22:43 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(17.15 KB, patch)
2022-02-10 23:07 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(21.64 KB, patch)
2022-02-11 11:52 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(24.81 KB, patch)
2022-02-11 15:49 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(24.98 KB, patch)
2022-02-14 13:13 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(21.75 KB, patch)
2022-02-14 15:10 PST
,
Nikos Mouchtaris
mrobinson
: review+
Details
Formatted Diff
Diff
Patch
(21.54 KB, patch)
2022-02-15 11:41 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Nikos Mouchtaris
Comment 1
2022-02-10 19:32:09 PST
Created
attachment 451633
[details]
Patch
Nikos Mouchtaris
Comment 2
2022-02-10 22:43:45 PST
Created
attachment 451642
[details]
Patch
Nikos Mouchtaris
Comment 3
2022-02-10 23:07:16 PST
Created
attachment 451646
[details]
Patch
Martin Robinson
Comment 4
2022-02-11 03:18:38 PST
Comment on
attachment 451646
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=451646&action=review
This looks pretty good to me. I had a couple comments, but I really like the WPT progression!
> Source/WebCore/platform/graphics/transforms/TransformOperations.cpp:85 > + if ((from.hasMatrixOperation() || hasMatrixOperation()) && (!from.isInvertible(boxSize) || !isInvertible(boxSize))) {
There are some non-matrix operations that lead to uninvertible transformation matrices. Do they also need to follow this code path? The specification mentions "scale(0)."
> Source/WebCore/platform/graphics/transforms/TransformOperations.h:66 > + for (const auto& operation : m_operations) {
I think this might be a good candidate for using `any_of` from the standard library.
Nikos Mouchtaris
Comment 5
2022-02-11 11:52:15 PST
Created
attachment 451733
[details]
Patch
Nikos Mouchtaris
Comment 6
2022-02-11 11:54:04 PST
(In reply to Martin Robinson from
comment #4
)
> Comment on
attachment 451646
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=451646&action=review
> > This looks pretty good to me. I had a couple comments, but I really like the > WPT progression! > > > Source/WebCore/platform/graphics/transforms/TransformOperations.cpp:85 > > + if ((from.hasMatrixOperation() || hasMatrixOperation()) && (!from.isInvertible(boxSize) || !isInvertible(boxSize))) { > > There are some non-matrix operations that lead to uninvertible > transformation matrices. Do they also need to follow this code path? The > specification mentions "scale(0)." >
From my understanding of this line in the spec I don't think so: Note: Animations to or from the neutral element of additions <matrix()>, matrix3d() and perspective() fall back to discrete animations
> > Source/WebCore/platform/graphics/transforms/TransformOperations.h:66 > > + for (const auto& operation : m_operations) { > > I think this might be a good candidate for using `any_of` from the standard > library.
Fixed.
Nikos Mouchtaris
Comment 7
2022-02-11 15:49:59 PST
Created
attachment 451753
[details]
Patch
Nikos Mouchtaris
Comment 8
2022-02-14 13:13:05 PST
Created
attachment 451934
[details]
Patch
Nikos Mouchtaris
Comment 9
2022-02-14 15:10:08 PST
Created
attachment 451945
[details]
Patch
Martin Robinson
Comment 10
2022-02-15 01:27:53 PST
Comment on
attachment 451945
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=451945&action=review
Looks good to me, with a couple nits.
> Source/WebCore/platform/graphics/transforms/TransformOperations.cpp:99 > +bool TransformOperations::shouldFallbackToDiscreteAnimation(const TransformOperations& from, const LayoutSize& boxSize) const
Super nit: Fallback => FallBack because "fall back" is the verb form and "fallback" is the noun.
> Source/WebCore/platform/graphics/transforms/TransformOperations.h:66 > + return std::any_of(m_operations.begin(), m_operations.end(), [](RefPtr<TransformOperation> op) {
Hrm. Can RefPtr<TransformOperation> be replaced with auto? I would use "operation" instead of "op" here, because "op" can also mean operand.
Nikos Mouchtaris
Comment 11
2022-02-15 11:41:24 PST
Created
attachment 452068
[details]
Patch
Nikos Mouchtaris
Comment 12
2022-02-15 13:58:05 PST
(In reply to Martin Robinson from
comment #10
)
> Comment on
attachment 451945
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=451945&action=review
> > Looks good to me, with a couple nits. > > > Source/WebCore/platform/graphics/transforms/TransformOperations.cpp:99 > > +bool TransformOperations::shouldFallbackToDiscreteAnimation(const TransformOperations& from, const LayoutSize& boxSize) const > > Super nit: Fallback => FallBack because "fall back" is the verb form and > "fallback" is the noun.
Fixed.
> > > Source/WebCore/platform/graphics/transforms/TransformOperations.h:66 > > + return std::any_of(m_operations.begin(), m_operations.end(), [](RefPtr<TransformOperation> op) { > > Hrm. Can RefPtr<TransformOperation> be replaced with auto? I would use > "operation" instead of "op" here, because "op" can also mean operand.
Fixed.
EWS
Comment 13
2022-02-15 16:27:36 PST
Committed
r289862
(
247302@main
): <
https://commits.webkit.org/247302@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 452068
[details]
.
Radar WebKit Bug Importer
Comment 14
2022-02-15 16:28:16 PST
<
rdar://problem/88994181
>
Antoine Quint
Comment 15
2022-02-16 01:48:55 PST
***
Bug 235781
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.
Top of Page
Format For Printing
XML
Clone This Bug