Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1e4a60e7e40a00a2de58d489c9dbbe3ffc30fb73
      
https://github.com/WebKit/WebKit/commit/1e4a60e7e40a00a2de58d489c9dbbe3ffc30fb73
  Author: Chris Dumez <[email protected]>
  Date:   2026-06-03 (Wed, 03 Jun 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-data-copyTo.any-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-data-copyTo.any.js
    M 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-data-copyTo.any.worker-expected.txt
    M Source/WebCore/Modules/webcodecs/WebCodecsAudioDataAlgorithms.cpp

  Log Message:
  -----------
  AudioData.copyTo accepts frameOffset == numberOfFrames instead of throwing 
RangeError
https://bugs.webkit.org/show_bug.cgi?id=316175

Reviewed by Youenn Fablet.

Step 7 of the WebCodecs "Compute Copy Element Count" algorithm
(https://www.w3.org/TR/webcodecs/#compute-copy-element-count) requires
throwing a RangeError when options.frameOffset is greater than or equal
to frameCount.

The check used > instead of >=, so frameOffset == numberOfFrames passed
through silently and resulted in a zero-frame copy rather than the
spec-mandated RangeError. The accompanying comment already stated the
correct rule; only the operator was wrong.

* 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-data-copyTo.any-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-data-copyTo.any.js:
(test):
* 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-data-copyTo.any.worker-expected.txt:
* Source/WebCore/Modules/webcodecs/WebCodecsAudioDataAlgorithms.cpp:
(WebCore::computeCopyElementCount):

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



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

Reply via email to