Map iOS touches to Flutter view coordinate system (flutter/engine#4425)

This change ensures that touches are mapped to the Flutter view
co-ordinate system. In the case of a Flutter view that doesn't share the
same origin and orientation as the screen co-ordinate system, touches
were appled in the wrong location. This bug affected Flutter views whose
origin was not the screen origin and Flutter apps running with the
in-call status bar on iPhones other than the iPhone X.
This commit is contained in:
najeira
2017-12-13 06:22:53 +09:00
committed by Chris Bracken
parent 7f0f66cf1a
commit 0c188ca473

View File

@@ -483,7 +483,7 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to
}
FXL_DCHECK(device_id != 0);
CGPoint windowCoordinates = [touch locationInView:nil];
CGPoint windowCoordinates = [touch locationInView:self.view];
blink::PointerData pointer_data;
pointer_data.Clear();