Commit 332c665
committed
Clamp setCurrentTimeFromBindings to prevent negative time
https://bugs.webkit.org/show_bug.cgi?id=278646
Reviewed by Eric Carlson.
Just clamp the value to avoid negative numbers when seeking.
Also return in GStreamer ports infinity as maxTimeSeekable for live streams.
Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time.htm
Also another bunch of tests have now corrected expectations.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-currentTime-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time-expected.txt:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/audio_loop_seek_to_eos-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time-expected.txt: Removed.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/video_loop_base-expected.txt:
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setCurrentTimeForBindings):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable const):
Canonical link: https://commits.webkit.org/283134@main1 parent 021946d commit 332c665
8 files changed
Lines changed: 1897 additions & 670 deletions
File tree
- LayoutTests
- imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/seeking
- platform/glib
- imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements
- seeking
- Source/WebCore
- html
- platform/graphics/gstreamer
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
Large diffs are not rendered by default.
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
5 | 3 | | |
Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
5 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3531 | 3531 | | |
3532 | 3532 | | |
3533 | 3533 | | |
| 3534 | + | |
| 3535 | + | |
3534 | 3536 | | |
3535 | 3537 | | |
3536 | 3538 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | | - | |
| 783 | + | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | | - | |
788 | | - | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
789 | 791 | | |
790 | 792 | | |
791 | 793 | | |
| |||
0 commit comments