On Mon, Jun 4, 2018 at 2:49 PM, Leo Ufimtsev <leoni...@redhat.com>
wrote:
How did webkit1's 'webkit_web_data_source_get_encoding()' function
retrieve the encoding and is there a way to do the same on webkit2?
I didn't know about this!
Looking at the old source code, it checked
DocumentLoader::overrideEncoding. If that was set, then it used that as
the encoding. If not, it used DocumentLoader::response to get the
ResourceResponse of the DocumentLoader, and then called
ResourceResponse::textEncodingName (getting the encoding from the HTTP
header).
It would probably be desirable to implement API to expose this.
DocumentLoader lives in the web process now, so it's going to require
adding an IPC message, probably between WebPage in the web process and
WebPageProxy in the UI process. Then WebKitWebResource would be able to
use that.
Michael
_______________________________________________
webkit-gtk mailing list
webkit-gtk@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-gtk