Bug 205383 - Screen blinks after open html attachment
Summary: Screen blinks after open html attachment
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Other
Hardware: iPhone / iPad iOS 13
: P2 Critical
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-18 02:28 PST by Yuliia
Modified: 2019-12-19 13:26 PST (History)
5 users (show)

See Also:


Attachments
Sample which may be used to reproduce described behavior (267.35 KB, application/zip)
2019-12-19 04:00 PST, Yuliia
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuliia 2019-12-18 02:28:09 PST
Minimum Steps to Reproduce:
1. load local html resource in WKWebView
F.e.:
        let htmlPath = Bundle.main.path(forResource: "index", ofType: "html")
        let htmlUrl = URL(fileURLWithPath: htmlPath!, isDirectory: false)
        webView.loadFileURL(htmlUrl, allowingReadAccessTo: htmlUrl)
2. Observe html file rendering process

Actual Result:
Content of file displays, screen starts to blink

Expected Result:
Content of file should be displayed without problems

Environment Details :
iPadPro iOS 13.3
Comment 1 Simon Fraser (smfr) 2019-12-18 11:35:16 PST
Please provide the entire project and the HTML that reproduces this. We need more than just a description of the problem. If you need to provide confidential info, please use bugreport.apple.com.
Comment 2 Yuliia 2019-12-19 04:00:01 PST
Created attachment 386093 [details]
Sample which may be used to reproduce described behavior

Provided project and the HTML that reproduces described issue.
Comment 3 Simon Fraser (smfr) 2019-12-19 13:21:16 PST
Blink looks like toggling between two viewport sizes.
Comment 4 Radar WebKit Bug Importer 2019-12-19 13:21:27 PST
<rdar://problem/58089555>
Comment 5 Simon Fraser (smfr) 2019-12-19 13:23:22 PST
I can reproduce.
Comment 6 Wenson Hsieh 2019-12-19 13:26:12 PST
This looks pretty bad.

For the time being, you can work around the issue by adding this line:

…
  let configuration = WKWebViewConfiguration()
+ configuration.defaultWebpagePreferences.preferredContentMode = .mobile

  webView = WKWebView(frame: view.bounds, configuration: configuration)
…