WKWebView breaks on Twitter Gif Playback when trying to minimise player

Number:rdar://32190597 Date Originated:15/05/2017
Status:Open Resolved:
Product:iOS SDK Product Version:10.3.1
Classification: Reproducible:Always

When viewing a webpage with WKWebView, viewing an embedded Twitter widget's gif animation will break the scrollview when trying to minimise the player.

This could be due to Twitter's handling of gif files as actual looping movies instead.

Steps to Reproduce:
- Use provided Project
- Launch app

1. Wait for webpage to load
2. Find Tweet containing gif of Skydiving cat
3. View gif in full screen (may take a couple of taps)
4. Press "Minimise Icon" in bottom right corner

Expected Results:
- Player should minimise and stop playing Twitter gif (movie)
- Minimise button should be hidden for this type of content

Actual Results:
- Player will minimise and then expand again several times, or.
- Player will break WKWebView's scrollview and overlay content on top of scrollview, web view, navigation bar, and even status bar

iOS 10.3.1


iPhone 7+ (device), iPhone SE (simulator)

'OverNavigationStatusBar.png', 'HowTo.png', 'WKWebViewTwitter.zip' and 'OverNavibationStatusBar-2.png' were successfully uploaded.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!