From 1c66c0866ee3e91c3e19c5d8248c4e7233fb85cb Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 25 Jun 2019 17:43:21 -0700 Subject: [PATCH] fix a bug where the platform view's transform is not reset before set frame (flutter/engine#9490) --- .../darwin/ios/framework/Source/FlutterPlatformViews.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index ea838e38172..b69b1e870d9 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -230,9 +230,10 @@ UIView* FlutterPlatformViewsController::ReconstructClipViewsChain(int number_of_ void FlutterPlatformViewsController::ApplyMutators(const MutatorsStack& mutators_stack, UIView* embedded_view) { + FML_DCHECK(CATransform3DEqualToTransform(head.layer.transform, CATransform3DIdentity)); + UIView* head = embedded_view; head.clipsToBounds = YES; - head.layer.transform = CATransform3DIdentity; ResetAnchor(head.layer); std::vector>::const_reverse_iterator iter = mutators_stack.bottom(); @@ -278,6 +279,7 @@ void FlutterPlatformViewsController::CompositeWithParams( const flutter::EmbeddedViewParams& params) { CGRect frame = CGRectMake(0, 0, params.sizePoints.width(), params.sizePoints.height()); UIView* touchInterceptor = touch_interceptors_[view_id].get(); + touchInterceptor.layer.transform = CATransform3DIdentity; touchInterceptor.frame = frame; int currentClippingCount = CountClips(params.mutatorsStack);