[Webkit-unassigned] [Bug 186797] WebView reload emojis messy

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 21 00:17:32 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=186797

--- Comment #14 from 1716329344 at qq.com ---
(In reply to Myles C. Maxfield from comment #11)
> I just made a test app with a WKWebView and the problem doesn't reproduce
> there either (in the Simulator).
> 
> If you try running the attached project, does it show the problem?

My Code:

let path = Bundle.main.path(forResource: "ExampleApp", ofType: "html")
        let url = URL(fileURLWithPath: path!)
        do {
            let htmlString = try String(contentsOfFile: path!, encoding: .utf8)
            webView.loadHTMLString(htmlString, baseURL: myURL)
        }
        catch let error {
            print(error)
        }


Your Code :

let myURL = Bundle.main.url(forResource: "ExampleApp", withExtension: "html")
        let myRequest = URLRequest(url: myURL!)
        webView.load(myRequest)

If I use yours,It is normal. "webView.loadHTMLString(htmlString, baseURL: myURL)" method and "baseURL" parameter cause this issue. Then I pass "Bundle.main.url(forResource: "ExampleApp", withExtension: "html)" to "baseURL" parameter instead of "URL(fileURLWithPath: path!)" , everything is normal.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180621/ffccad77/attachment.html>


More information about the webkit-unassigned mailing list