[Webkit-unassigned] [Bug 184444] [GTK] webkit_web_view_load_html() garbages linked CSS content

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 17 19:55:14 PDT 2018


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

Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at igalia.com

--- Comment #4 from Michael Catanzaro <mcatanzaro at igalia.com> ---
WebKit doesn't try to guess your file encoding, like Firefox does, because in practice that is probabilistic and going to fail regularly for encodings that matter in practice (e.g. GB-18030). So instead you have to specify it manually if you want something other than the default, which is ISO-8859-1 for web compat. Sadly you cannot feed UTF-8 into WebKit and expect that to work without declaring the encoding.

HTML is the easiest case, because HTML allows you to specify the encoding as part of the document. It's when you're trying to use text files that you're really going to have a hard time, as your only options there are (a) HTTP headers (doesn't work for local files), or (b) API request (webkit_web_view_load_bytes()).

(In reply to Milan Crha from comment #3)
> I would go with the comment in WebPageproxy.cpp
> // FIXME: Get rid of loadHTMLString and just use loadData instead.
> but it doesn't cover loadAlternateHTMLString(), thus such change would
> a) require twice as memory (due to copying the content into a GBytes
> structure),
> b) it would be incomplete anyway (due to this alternate function).

What does this have to do with the bug?

> I have a trivial patch for webkit_web_view_load_html() and
> webkit_web_view_load_plain_text(), if you are interested.

It'd at least be good to see.

-- 
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/20180418/3b30eaae/attachment.html>


More information about the webkit-unassigned mailing list