Skip to content
Permalink
Browse files
Source/WebCore:
Changed playbackRate and defaultPlaybackRate from unrestricted double
to double.
https://bugs.webkit.org/show_bug.cgi?id=235174
rdar://problem/87815745

Patch by Takeshi Sone <takeshi.sone@gmail.com> on 2022-01-31
Reviewed by Eric Carlson.

Test: media/video-playbackrate-undefined.html

* html/HTMLMediaElement.idl:

LayoutTests:
Added a test to verify that setting undefined to video.playbackRate
raises an exception.
https://bugs.webkit.org/show_bug.cgi?id=235174
rdar://problem/87815745

Patch by Takeshi Sone <takeshi.sone@gmail.com> on 2022-01-31
Reviewed by Eric Carlson.

* media/video-playbackrate-undefined-expected.txt: Added.
* media/video-playbackrate-undefined.html: Added.


Canonical link: https://commits.webkit.org/246597@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ts1 authored and webkit-commit-queue committed Jan 31, 2022
1 parent c5f7467 commit 1f9b42f7b4bfe9b7166ff2da0f5b1ef75f5a1f7c
Showing 5 changed files with 53 additions and 2 deletions.
@@ -1,3 +1,15 @@
2022-01-31 Takeshi Sone <takeshi.sone@gmail.com>

Added a test to verify that setting undefined to video.playbackRate
raises an exception.
https://bugs.webkit.org/show_bug.cgi?id=235174
rdar://problem/87815745

Reviewed by Eric Carlson.

* media/video-playbackrate-undefined-expected.txt: Added.
* media/video-playbackrate-undefined.html: Added.

2022-01-31 Asumu Takikawa <asumu@igalia.com>

Fix handling of module script errors in WebCore
@@ -0,0 +1,5 @@

TEST(video.playbackRate = undefined) THROWS('TypeError: The provided value is non-finite') OK
TEST(video.defaultPlaybackRate = undefined) THROWS('TypeError: The provided value is non-finite') OK
END OF TEST

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Setting undefined to playbackRate and defaultPlaybackRate</title>
</head>
<body>
<video></video>
<script src="video-test.js"></script>
<script>
testException(
"video.playbackRate = undefined",
"'TypeError: The provided value is non-finite'"
);
testException(
"video.defaultPlaybackRate = undefined",
"'TypeError: The provided value is non-finite'"
);
endTest();
</script>
</body>
</html>
@@ -1,3 +1,16 @@
2022-01-31 Takeshi Sone <takeshi.sone@gmail.com>

Changed playbackRate and defaultPlaybackRate from unrestricted double
to double.
https://bugs.webkit.org/show_bug.cgi?id=235174
rdar://problem/87815745

Reviewed by Eric Carlson.

Test: media/video-playbackrate-undefined.html

* html/HTMLMediaElement.idl:

2022-01-31 Asumu Takikawa <asumu@igalia.com>

Fix handling of module script errors in WebCore
@@ -75,8 +75,8 @@ typedef (
readonly attribute unrestricted double duration;
Date getStartDate();
readonly attribute boolean paused;
attribute unrestricted double defaultPlaybackRate;
attribute unrestricted double playbackRate;
attribute double defaultPlaybackRate;
attribute double playbackRate;
readonly attribute TimeRanges played;
readonly attribute TimeRanges seekable;
readonly attribute boolean ended;

0 comments on commit 1f9b42f

Please sign in to comment.