Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/track/TextTrack.cpp |
| diff --git a/third_party/WebKit/Source/core/html/track/TextTrack.cpp b/third_party/WebKit/Source/core/html/track/TextTrack.cpp |
| index 1cd60174bdb63963e3b387e178c1848c9b1bfd7f..6203f5ecd8bd31077f737010084ac04a60eb97a2 100644 |
| --- a/third_party/WebKit/Source/core/html/track/TextTrack.cpp |
| +++ b/third_party/WebKit/Source/core/html/track/TextTrack.cpp |
| @@ -425,6 +425,14 @@ bool TextTrack::isRendered() |
| return true; |
| } |
| +bool TextTrack::canBeRendered() |
| +{ |
| + // A track can be displayed when it's of kind captions or subtitles and hasn't failed to load. |
| + if ((kind() == captionsKeyword() || kind() == subtitlesKeyword()) && readinessState() != FailedToLoad) |
|
fs
2016/02/24 10:14:57
Could you write this like:
if (kind() != captions
srivats
2016/02/25 21:47:56
Done.
|
| + return true; |
| + return false; |
| +} |
| + |
| TextTrackCueList* TextTrack::ensureTextTrackCueList() |
| { |
| if (!m_cues) |