Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
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: 3 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ TheOneWithTheBraid <[email protected]>
Twin Sun, LLC <[email protected]>
Qixing Cao <[email protected]>
LinXunFeng <[email protected]>
Amir Panahandeh <[email protected]>
Amir Panahandeh <[email protected]>
Rulong Chen(陈汝龙)<[email protected]>

Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ - (void)testChildClippingViewHitTests {
XCTAssertTrue([childClippingView pointInside:CGPointMake(199, 199) withEvent:nil]);
}

- (void)testReleasesBackdropFilterSubviewsOnChildClippingViewDealloc {
__weak NSMutableArray<UIVisualEffectView*>* weakBackdropFilterSubviews = nil;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: snake case

Copy link
Member

Choose a reason for hiding this comment

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

Hm, why would this Objective-C local be snake case?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh because i saw clipping_view below is snake case. maybe that should be camel case?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah that one should have been camel case.

@autoreleasepool {
ChildClippingView* clipping_view = [[ChildClippingView alloc] initWithFrame:CGRectZero];
weakBackdropFilterSubviews = clipping_view.backdropFilterSubviews;
XCTAssertNotNil(weakBackdropFilterSubviews);
clipping_view = nil;
}
XCTAssertNil(weakBackdropFilterSubviews);
}

- (void)testApplyBackdropFilter {
flutter::FlutterPlatformViewsTestMockPlatformViewDelegate mock_delegate;
auto thread_task_runner = CreateNewThread("FlutterPlatformViewsTest");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
// filters.
- (void)applyBlurBackdropFilters:(NSArray<PlatformViewFilter*>*)filters;

// For testing only.
- (NSMutableArray*)backdropFilterSubviews;
@end

namespace flutter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ - (void)dealloc {

- (NSMutableArray*)backdropFilterSubviews {
if (!_backdropFilterSubviews) {
_backdropFilterSubviews = [[[NSMutableArray alloc] init] retain];
_backdropFilterSubviews = [[NSMutableArray alloc] init];
}
return _backdropFilterSubviews;
}
Expand Down