diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/media/webvtt | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/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.cpp | 36 |
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(); |