<?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>232386</bug_id>
          
          <creation_ts>2021-10-27 09:59:47 -0700</creation_ts>
          <short_desc>REGRESSION(r284521) [GTK][WPE] many tests report parse errors as a result of the test files being interpreted as XHTML rather than HTML</short_desc>
          <delta_ts>2021-11-10 06:14:45 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>232471</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=230797</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=232471</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="Arcady Goldmints-Orlov">crzwdjk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>clopez</cc>
    
    <cc>jtojnar</cc>
    
    <cc>lmoura</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1809291</commentid>
    <comment_count>0</comment_count>
    <who name="Arcady Goldmints-Orlov">crzwdjk</who>
    <bug_when>2021-10-27 09:59:47 -0700</bug_when>
    <thetext>As a result of the change in r284521, numerous test files have started getting loaded as XHTML rather than HTML and the results of those tests end up being just a parse error message.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1809302</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-10-27 10:09:56 -0700</bug_when>
    <thetext>Of course, since r284521 was just a straight revert of r276635, I would expect the test expectations to go back to what they were prior to r276635.

The *correct* behavior would be &quot;match whatever Safari does,&quot; but I suspect we never did. My recommended solution, from bug #230797:

&quot;&quot;&quot;
Of course, it would be *better* for WebKit to make content type decisions based on the DOCTYPE instead, but we can&apos;t expect a content sniffer to do that. We would have to implement it ourselves in WebKit, rather than farming out the work to GIO. I wonder how other ports handle this.
&quot;&quot;&quot;

This is what Bastien has recommended, as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1809306</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-10-27 10:12:46 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #1)
&gt; Of course, since r284521 was just a straight revert of r276635, I would
&gt; expect the test expectations to go back to what they were prior to r276635.

Maybe the shared-mime-info version upgrade is related? I didn&apos;t revert the shared-mime-info version upgrade. The addition of new parse errors could mean shared-mime-info is just doing a better job of detecting XHTML than it was before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1809428</commentid>
    <comment_count>3</comment_count>
    <who name="Arcady Goldmints-Orlov">crzwdjk</who>
    <bug_when>2021-10-27 14:18:35 -0700</bug_when>
    <thetext>I gardened some of the failures in r284936, and I am going to take a look at what happens if I revert the shared-mime-info change as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1810270</commentid>
    <comment_count>4</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2021-10-29 15:02:39 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #2)
&gt; (In reply to Michael Catanzaro from comment #1)
&gt; &gt; Of course, since r284521 was just a straight revert of r276635, I would
&gt; &gt; expect the test expectations to go back to what they were prior to r276635.
&gt; 
&gt; Maybe the shared-mime-info version upgrade is related? I didn&apos;t revert the
&gt; shared-mime-info version upgrade. The addition of new parse errors could
&gt; mean shared-mime-info is just doing a better job of detecting XHTML than it
&gt; was before.

The shared-mime-info was bumped from 1.10 to 2.1 in r276635. Among other changes:

1.13:
* Prefer text/html to XHTML for *.html files
* Better magic for text/html files
* Fix SVG magic for files embedded in HTML

1.15:
* Fix some HTML files being detected as XML

(from: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/releases )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1813569</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-11-10 06:14:45 -0800</bug_when>
    <thetext>We currently have two different bugs for this issue. This one is older, but I think there&apos;s a little more useful discussion in the other bug, so let&apos;s keep that one instead.

*** This bug has been marked as a duplicate of bug 232471 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>