Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1be54df8bbe887e9faaaf4a9bfe18565f48af0e2
      
https://github.com/WebKit/WebKit/commit/1be54df8bbe887e9faaaf4a9bfe18565f48af0e2
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-06-16 (Tue, 16 Jun 2026)

  Changed paths:
    A 
LayoutTests/media/media-source/media-source-detach-removes-all-text-tracks-expected.txt
    A 
LayoutTests/media/media-source/media-source-detach-removes-all-text-tracks.html
    M Source/WebCore/Modules/mediasource/MediaSource.cpp

  Log Message:
  -----------
  MediaSource text-track removal loop always processes the last track
https://bugs.webkit.org/show_bug.cgi?id=317015
rdar://179508398

Reviewed by Eric Carlson.

The text-track loop read "*textTracks->lastItem()" instead of indexing with the 
loop variable like
the audio and video loops ("item(index)"). On the detach path (withDestruction 
== false) the list is
never shrunk, so lastItem() returns the same final track on every iteration 
Index by the loop
variable.

Test: media/media-source/media-source-detach-removes-all-text-tracks.html

* 
LayoutTests/media/media-source/media-source-detach-removes-all-text-tracks-expected.txt:
 Added.
* 
LayoutTests/media/media-source/media-source-detach-removes-all-text-tracks.html:
 Added.
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::removeSourceBufferWithOptionalDestruction):

Canonical link: https://commits.webkit.org/315310@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to