<?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>260409</bug_id>
          
          <creation_ts>2023-08-18 14:43:09 -0700</creation_ts>
          <short_desc>Empty files should not succeed in loading (as WebVTT)</short_desc>
          <delta_ts>2023-10-23 02:48:00 -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>Media</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://wpt.live/webvtt/parsing/file-parsing/signature-invalid.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>179370</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annevk</cc>
    
    <cc>destra</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>karlcow</cc>
    
    <cc>kohei.ueno119</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1972148</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-08-18 14:43:09 -0700</bug_when>
    <thetext>Hi Team,

While going through Blink&apos;s commit, I came across another potential merge:

Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/0983d4b64cb5f519684f773daa27b2ac9b8f8688

WebKit Source: https://searchfox.org/wubkat/source/Source/WebCore/loader/TextTrackLoader.cpp#120

WPT Test Case: https://wpt.fyi/results/webvtt/parsing/file-parsing/signature-invalid.html?label=master&amp;label=experimental&amp;aligned=&amp;q=signature

WPT Test Case Live Link: http://wpt.live/webvtt/parsing/file-parsing/signature-invalid.html

^ It is about first failure - &apos;signature, empty&apos;.

Just wanted to raise, so we can fix it. Adding &quot;WPTImpact&quot; and &quot;BrowserCompat&quot; tags.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972186</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-08-18 18:34:04 -0700</bug_when>
    <thetext>&lt;rdar://problem/114118292&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973374</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-08-24 15:45:07 -0700</bug_when>
    <thetext>NOTE - Doing 1-1 Blink Merge leads to two WPT regressions:

html/semantics/embedded-content/media-elements/track/track-element
/track-add-remove-cue.html

and

html/semantics/embedded-content/media-elements/track/track-element/track-text-track-cue-list.html

___

PR attempt: https://github.com/WebKit/WebKit/pull/16863

____

NOTE: We should sync &apos;webvtt&apos; and look into why the tests are timing out and fix it.

Still investigating but closing my PR for time being.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1976339</commentid>
    <comment_count>3</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-09-07 23:26:14 -0700</bug_when>
    <thetext>I was thinking of fixing this in TextTrackLoader::notifyFinished by changing

if (m_cueParser)
    m_cueParser-&gt;fileFinished();

to

if (m_cueParser)
    m_cueParser-&gt;fileFinished();
else
    m_state = Failed;

but I&apos;m not sure if that would similarly regress tests.

However, looking closely at your commit it seems that WebKit would still invoke processNewCueData for the non-Failed states whereas Chromium would not (at least not at that point in time).

Syncing webvtt WPT is probably a good next step here. I can maybe do that today between meetings.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1986670</commentid>
    <comment_count>4</comment_count>
    <who name="Kueno">kohei.ueno119</who>
    <bug_when>2023-10-21 06:25:16 -0700</bug_when>
    <thetext>@Ahmad Saleem @Anne van Kesteren

Are you working on this issue? If not, I&apos;d be happy to take it over.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1986671</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-10-21 06:26:32 -0700</bug_when>
    <thetext>(In reply to Kueno from comment #4)
&gt; @Ahmad Saleem @Anne van Kesteren
&gt; 
&gt; Are you working on this issue? If not, I&apos;d be happy to take it over.

I am not. Go ahead and take it. You are doing amazing job!! We all really appreciate it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1986742</commentid>
    <comment_count>6</comment_count>
    <who name="Kueno">kohei.ueno119</who>
    <bug_when>2023-10-22 06:13:08 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/19401</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1986791</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-10-23 02:47:58 -0700</bug_when>
    <thetext>Committed 269646@main (d40154a4fe8f): &lt;https://commits.webkit.org/269646@main&gt;

Reviewed commits have been landed. Closing PR #19401 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>