<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>184444</bug_id>
          
          <creation_ts>2018-04-10 01:14:16 -0700</creation_ts>
          <short_desc>[GTK] webkit_web_view_load_html() garbages linked CSS content</short_desc>
          <delta_ts>2018-05-02 16:10:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=184660</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Milan Crha">mcrha</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>kapouer</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1413235</commentid>
    <comment_count>0</comment_count>
      <attachid>337598</attachid>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2018-04-10 01:14:16 -0700</bug_when>
    <thetext>Created attachment 337598
wk2-css.c

This looks like bug #127481, but that one is meant to be fixed. Maybe something had been missing. My test with 2.18.6 and git checkout at git-svn-id: http://svn.webkit.org/repository/webkit/trunk@230032 268f45cc-cd09-0410-ab3c-d52691b4dbfc fails. The trick here is to have the HTML content contain UTF-8 letters, it doesn&apos;t matter which.

Using
   webkit_web_view_load_bytes (web_view, bytes, NULL, NULL, &quot;file://&quot;);
on exactly the same content of loading that with
   webkit_web_view_load_uri (WEBKIT_WEB_VIEW (wk), &quot;file:///tmp/a.html&quot;);
doesn&apos;t exhibit the issue, it&apos;s only the
   webkit_web_view_load_html (web_view, html, &quot;file://&quot;);
misbehaving. There doesn&apos;t change anything whether the HTML content contains
  &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
or not, everything is about the content using only ASCII or UTF-8 letters.

Attached is my test program, which references webview.css file provided by &apos;evolution&apos; program/package. The first line contains a command line how to compile and run it. Some more details are shown in the dialog itself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413240</commentid>
    <comment_count>1</comment_count>
    <who name="Jérémy Lal">kapouer</who>
    <bug_when>2018-04-10 01:41:38 -0700</bug_when>
    <thetext>Did you try

    webkit_web_view_load_bytes (web_view, bytes, &quot;text/html&quot;, &quot;utf-8&quot;, &quot;file://&quot;);

?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413241</commentid>
    <comment_count>2</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2018-04-10 02:13:38 -0700</bug_when>
    <thetext>Well, I wrote I did and I wrote it _doesn&apos;t exhibit the issue_.

Okay, there&apos;s a typo which might confuse you, the text:
   content of loading
should be
   content or loading
. I hope it&apos;s clearer now.

Anyway, from bug #127481, it looks like WebKit does some expectation on file content encoding from parent&apos;s file content encoding. I think it&apos;s a bad idea. I do not see any reason why I could not have an HTML page in iso-8859-2, which links a CSS file in UTF-8 or even the main document in UTF-16, while the CSS file in UTF-8 or ASCII. Imagine it as a localized HTML pages in various encodings, where all these localized pages share the same CSS file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413242</commentid>
    <comment_count>3</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2018-04-10 02:25:10 -0700</bug_when>
    <thetext>I would go with the comment in WebPageproxy.cpp
// FIXME: Get rid of loadHTMLString and just use loadData instead.
but it doesn&apos;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).

I have a trivial patch for webkit_web_view_load_html() and webkit_web_view_load_plain_text(), if you are interested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1415443</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-04-17 19:55:14 -0700</bug_when>
    <thetext>WebKit doesn&apos;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&apos;s when you&apos;re trying to use text files that you&apos;re really going to have a hard time, as your only options there are (a) HTTP headers (doesn&apos;t work for local files), or (b) API request (webkit_web_view_load_bytes()).

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

What does this have to do with the bug?

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

It&apos;d at least be good to see.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1415501</commentid>
    <comment_count>5</comment_count>
      <attachid>338201</attachid>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2018-04-18 01:25:43 -0700</bug_when>
    <thetext>Created attachment 338201
trvial patch (just to show it)

(In reply to Michael Catanzaro from comment #4)
&gt; WebKit doesn&apos;t try to guess your file encoding, ...

Maybe I did not use the &apos;encoding&apos; word properly. If the bug #127481 is right, and it seems it is, then WebKit has some expectation about HTML and its CSS files &quot;encodings&quot;, which is wrong, from my point of view. The above test proves it and it&apos;s all about HTML and its CSS sub-file. I&apos;ll try to rephrase, but I&apos;m afraid it&apos;ll not help much.

The above wk2-css.c loads an HTML document which contains:
   &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
and
   &lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;file:///usr/.....css&quot;&gt;
using webkit_web_view_load_html() function. The webview itself has also set utf-8 as its default encoding. Whether the .css file is loaded properly solely depends on the actual content of the HTML file, which is wrong from my point of view. When the HTML file contains non-ASCII letters, then the .css file is read as UTF-16 (thus it looks like a garbage), when the HTML file contains only ASCII letters, then the .css file is read as UTF-8 (or some other single-byte encoding, it doesn&apos;t matter, it&apos;s not that important which single-byte encoding it is, because it&apos;s only ASCII there).

I can mix ASCII HTML with UTF-16 CSS, the same as UTF-8/UTF-16 HTML with ASCII CSS, there should not be any issue with it. Furthermore, I believe most (if not all) UTF-16 files contain the Unicode marker (0xFEFF), thus it&apos;s easily detectable that the file is in UTF-16. When the marker is not there, then you can add a bit more heuristic there, but even then I&apos;d expect the CSS is in the default encoding, if no other is passed by the caller.

&gt; What does this have to do with the bug?

Everything and nothing. The loadData() can specify the encoding which the loadHTML/loadPlainText cannot. And you said you want to be explicit about encodings.

&gt; It&apos;d at least be good to see.

Here you are. It uses UTF-8 encoding, but it can use the default encoding from the WebKitSettings, it depends whether you&apos;d want to extend the documentation for the two functions too. I do not think the patch is good for production, though, due to the reasons in comment #3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1415561</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-04-18 09:19:31 -0700</bug_when>
    <thetext>Hmmm... gchar* strings are always UTF-8 in GLib APIs, always, that&apos;s a GLib convention, not a WebKit convention. So WebKit treats it as such, and the caller is responsible for converting to UTF-8 before calling webkit_web_view_load_html() or webkit_web_view_load_plain_text().

This usually works, because applications can usually assume that files on disk are always UTF-8. But it breaks down badly for HTML and CSS files with WebKit. We have the WebKit API assuming the input is UTF-8 and converts from UTF-8 unconditionally. But then it goes ahead and treats it as ISO-8859-1 by default, or whatever other encoding is specified in WebKitSettings. And WebKit uses UTF-16 for everything internally (WTF::String), so if anything is being treated as UTF-16, that&apos;s probably a bug related to a missing conversion somewhere.

So while on one hand, it seems natural that input should be UTF-8, it does seem more than a little unfriendly to ignore the default encoding that was set with WebKitSettings. Carlos, what do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1415571</commentid>
    <comment_count>7</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2018-04-18 09:50:49 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; gchar* strings are always UTF-8 in GLib APIs, always, that&apos;s a GLib
&gt; convention

Not general gchar *strings/variables, see for example:
https://developer.gnome.org/glib/2.54/glib-Character-Set-Conversion.html#g-filename-to-utf8

But I agree with you, it&apos;s a reasonable expectation that gchar * is a single-byte encoding and I&apos;d go even further and expect, in case of webkit_web_view_load_html() and webkit_web_view_load_plain_text() and the one for alternative representation, that the passed-in string is in UTF-8, or better the WebKitSettings&apos; default-encoding.

It won&apos;t fix the issue of mixed HTML and CSS on its own, but it&apos;s a good start. See the mentioned bug #127481 where the guessing on CSS from the actual content of the HTML is possibly done (aka WebPage::loadString() according to the attached patch there, but it is more than 4 years old now, thus it could change heavily meanwhile).</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>337598</attachid>
            <date>2018-04-10 01:14:16 -0700</date>
            <delta_ts>2018-04-10 01:14:16 -0700</delta_ts>
            <desc>wk2-css.c</desc>
            <filename>wk2-css.c</filename>
            <type>text/plain</type>
            <size>3826</size>
            <attacher name="Milan Crha">mcrha</attacher>
            
              <data encoding="base64">LyogZ2NjIGBwa2ctY29uZmlnIC0tY2ZsYWdzIC0tbGlicyBndGsrLTMuMCB3ZW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dmlld19nZXRfc2V0dGluZ3MgKFdFQktJVF9XRUJfVklFVyAod2spKTsKCgl3ZWJraXRfc2V0
dGluZ3Nfc2V0X2VuYWJsZV9mcmFtZV9mbGF0dGVuaW5nIChzZXR0aW5ncywgVFJVRSk7CgoJZ3Rr
X2NvbnRhaW5lcl9hZGQgKEdUS19DT05UQUlORVIgKGNvbnRhaW5lciksIHdrKTsKCWdfb2JqZWN0
X3NldCAoR19PQkpFQ1QgKHdrKSwKCQkiaGV4cGFuZCIsIFRSVUUsCgkJImhhbGlnbiIsIEdUS19B
TElHTl9GSUxMLAoJCSJ2ZXhwYW5kIiwgVFJVRSwKCQkidmFsaWduIiwgR1RLX0FMSUdOX0ZJTEws
CgkJImhlaWdodC1yZXF1ZXN0IiwgOTAsCgkJIndpZHRoLXJlcXVlc3QiLCA5MCwKCQlOVUxMKTsK
CglyZWxvYWRfaHRtbCAoV0VCS0lUX1dFQl9WSUVXICh3ayksIEdUS19FTlRSWSAoZW50KSk7Cgkv
KiB3ZWJraXRfd2ViX3ZpZXdfbG9hZF91cmkgKFdFQktJVF9XRUJfVklFVyAod2spLCAiZmlsZTov
Ly90bXAvYS5odG1sIik7ICovCgoJZ3RrX3dpZGdldF9zaG93X2FsbCAoZ3RrX2RpYWxvZ19nZXRf
Y29udGVudF9hcmVhIChHVEtfRElBTE9HIChkaWFsb2cpKSk7CglndGtfZGlhbG9nX3J1biAoR1RL
X0RJQUxPRyAoZGlhbG9nKSk7CgoJZ3RrX3dpZGdldF9kZXN0cm95IChkaWFsb2cpOwoKCXJldHVy
biAwOwp9Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>338201</attachid>
            <date>2018-04-18 01:25:43 -0700</date>
            <delta_ts>2018-04-18 01:25:43 -0700</delta_ts>
            <desc>trvial patch (just to show it)</desc>
            <filename>wk.patch</filename>
            <type>text/plain</type>
            <size>1451</size>
            <attacher name="Milan Crha">mcrha</attacher>
            
              <data encoding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ZVVS
SSk7CisKKyAgICBnX2J5dGVzX3VucmVmKGJ5dGVzKTsKIH0KIAogLyoqCkBAIC0yNjE0LDEwICsy
NjIwLDE2IEBAIHZvaWQgd2Via2l0X3dlYl92aWV3X2xvYWRfYWx0ZXJuYXRlX2h0bWwoV2ViS2l0
V2ViVmlldyogd2ViVmlldywgY29uc3QgZ2NoYXIqIGNvCiAgKi8KIHZvaWQgd2Via2l0X3dlYl92
aWV3X2xvYWRfcGxhaW5fdGV4dChXZWJLaXRXZWJWaWV3KiB3ZWJWaWV3LCBjb25zdCBnY2hhciog
cGxhaW5UZXh0KQogeworICAgIEdCeXRlcyAqYnl0ZXM7CisKICAgICBnX3JldHVybl9pZl9mYWls
KFdFQktJVF9JU19XRUJfVklFVyh3ZWJWaWV3KSk7CiAgICAgZ19yZXR1cm5faWZfZmFpbChwbGFp
blRleHQpOwogCi0gICAgZ2V0UGFnZSh3ZWJWaWV3KS5sb2FkUGxhaW5UZXh0U3RyaW5nKFN0cmlu
Zzo6ZnJvbVVURjgocGxhaW5UZXh0KSk7CisgICAgYnl0ZXMgPSBnX2J5dGVzX25ldyhwbGFpblRl
eHQsIHN0cmxlbihwbGFpblRleHQpKTsKKworICAgIHdlYmtpdF93ZWJfdmlld19sb2FkX2J5dGVz
KHdlYlZpZXcsIGJ5dGVzLCAidGV4dC9wbGFpbiIsIE5VTEwsIE5VTEwpOworCisgICAgZ19ieXRl
c191bnJlZihieXRlcyk7CiB9CiAKIHN0YXRpYyB2b2lkIHJlbGVhc2VHQnl0ZXModW5zaWduZWQg
Y2hhciosIGNvbnN0IHZvaWQqIGJ5dGVzKQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>