Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable ViewTransform unit tests for iOS #13642

Merged
merged 2 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/Core/src/Platform/iOS/CoreAnimationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ internal static Matrix4x4 GetViewTransform(this CALayer layer)
if (layer == null)
return new Matrix4x4();

var superLayer = layer.SuperLayer;
if (layer.Transform.IsIdentity && superLayer == null)
return new Matrix4x4();

Comment on lines -40 to -43
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does fix the test and I don't see any visual change in the working of the transformations on iOS.

From what I gather on the line below we're already checking if the SuperLayer is null and else just take the identity matrix and apply the transform to whichever one comes out of that null coalescing?

But happy to have a more experts opinion here. I see @drasticactions did something around this area in #5206

var superTransform = layer.SuperLayer?.GetChildTransform() ?? CATransform3D.Identity;

return layer.GetLocalTransform()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,7 @@ protected void AssertWithinTolerance(Graphics.Size expected, Graphics.Size actua
AssertWithinTolerance(expected.Width, actual.Width, tolerance, "Width was not within tolerance.");
}

[Theory(DisplayName = "Native View Transforms are not empty"
#if IOS
, Skip = "https://github.com/dotnet/maui/issues/3600"
#endif
)]
[Theory(DisplayName = "PlatformView Transforms are not empty")]
[InlineData(1)]
[InlineData(100)]
[InlineData(1000)]
Expand Down