@@ -1507,6 +1507,17 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView {
15071507 SkMatrix finalMatrix;
15081508 finalMatrix.setConcat (screenScaleMatrix, rotateMatrix);
15091509
1510+ // The childclippingview's frame is set based on flow, but the platform view's frame is set based
1511+ // on quartz. Although they should be the same, we should tolerate small floating point
1512+ // errors.
1513+ // Push clip rects the same size as the platform view but faking a floating point error.
1514+ SkRect clipRectSmaller =
1515+ SkRect::MakeXYWH (0 , 0 , 300 - kFloatCompareEpsilon , 300 - kFloatCompareEpsilon );
1516+ stack.PushClipRect (clipRectSmaller);
1517+ SkRect clipRectLarger =
1518+ SkRect::MakeXYWH (0 , 0 , 300 + kFloatCompareEpsilon , 300 + kFloatCompareEpsilon );
1519+ stack.PushClipRect (clipRectLarger);
1520+
15101521 auto embeddedViewParams =
15111522 std::make_unique<flutter::EmbeddedViewParams>(finalMatrix, SkSize::Make (300 , 300 ), stack);
15121523
@@ -1516,9 +1527,7 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView {
15161527 toView: mockFlutterView];
15171528 XCTAssertTrue ([gMockPlatformView .superview.superview isKindOfClass: ChildClippingView.class ]);
15181529 ChildClippingView* childClippingView = (ChildClippingView*)gMockPlatformView .superview .superview ;
1519- // The childclippingview's frame is set based on flow, but the platform view's frame is set based
1520- // on quartz. Although they should be the same, but we should tolerate small floating point
1521- // errors.
1530+ // See above comment about tolerating small floating point errors.
15221531 XCTAssertLessThan (fabs (platformViewRectInFlutterView.origin .x - childClippingView.frame .origin .x ),
15231532 kFloatCompareEpsilon );
15241533 XCTAssertLessThan (fabs (platformViewRectInFlutterView.origin .y - childClippingView.frame .origin .y ),
@@ -1529,6 +1538,8 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView {
15291538 XCTAssertLessThan (
15301539 fabs (platformViewRectInFlutterView.size .height - childClippingView.frame .size .height ),
15311540 kFloatCompareEpsilon );
1541+
1542+ XCTAssertNil (childClippingView.maskView );
15321543}
15331544
15341545- (void )testClipsDoNotInterceptWithPlatformViewShouldNotAddMaskView {
0 commit comments