summaryrefslogtreecommitdiffstats
path: root/dom/media/webvtt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /dom/media/webvtt
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/webvtt')
-rw-r--r--dom/media/webvtt/TextTrack.cpp36
1 files changed, 2 insertions, 34 deletions
diff --git a/dom/media/webvtt/TextTrack.cpp b/dom/media/webvtt/TextTrack.cpp
index 7ee9ee63d2..7a5b398d2d 100644
--- a/dom/media/webvtt/TextTrack.cpp
+++ b/dom/media/webvtt/TextTrack.cpp
@@ -23,20 +23,6 @@ extern mozilla::LazyLogModule gTextTrackLog;
namespace mozilla::dom {
-static const char* ToStateStr(const TextTrackMode aMode) {
- switch (aMode) {
- case TextTrackMode::Disabled:
- return "DISABLED";
- case TextTrackMode::Hidden:
- return "HIDDEN";
- case TextTrackMode::Showing:
- return "SHOWING";
- default:
- MOZ_ASSERT_UNREACHABLE("Invalid state.");
- }
- return "Unknown";
-}
-
static const char* ToReadyStateStr(const TextTrackReadyState aState) {
switch (aState) {
case TextTrackReadyState::NotLoaded:
@@ -53,24 +39,6 @@ static const char* ToReadyStateStr(const TextTrackReadyState aState) {
return "Unknown";
}
-static const char* ToTextTrackKindStr(const TextTrackKind aKind) {
- switch (aKind) {
- case TextTrackKind::Subtitles:
- return "Subtitles";
- case TextTrackKind::Captions:
- return "Captions";
- case TextTrackKind::Descriptions:
- return "Descriptions";
- case TextTrackKind::Chapters:
- return "Chapters";
- case TextTrackKind::Metadata:
- return "Metadata";
- default:
- MOZ_ASSERT_UNREACHABLE("Invalid kind.");
- }
- return "Unknown";
-}
-
NS_IMPL_CYCLE_COLLECTION_INHERITED(TextTrack, DOMEventTargetHelper, mCueList,
mActiveCueList, mTextTrackList,
mTrackElement)
@@ -129,8 +97,8 @@ void TextTrack::SetMode(TextTrackMode aValue) {
if (mMode == aValue) {
return;
}
- WEBVTT_LOG("Set mode=%s for track kind %s", ToStateStr(aValue),
- ToTextTrackKindStr(mKind));
+ WEBVTT_LOG("Set mode=%s for track kind %s", GetEnumString(aValue).get(),
+ GetEnumString(mKind).get());
mMode = aValue;
HTMLMediaElement* mediaElement = GetMediaElement();