| 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 26858a7f9bc763a45be57a13478bd375195e606e..259ac3fe8444458792a82f92fa8fd00b825b5c06 100644
|
| --- a/third_party/WebKit/Source/core/html/track/TextTrack.cpp
|
| +++ b/third_party/WebKit/Source/core/html/track/TextTrack.cpp
|
| @@ -414,7 +414,7 @@ void TextTrack::invalidateTrackIndex()
|
| m_renderedTrackIndex = invalidTrackIndex;
|
| }
|
|
|
| -bool TextTrack::isRendered()
|
| +bool TextTrack::isRendered() const
|
| {
|
| if (kind() != captionsKeyword() && kind() != subtitlesKeyword())
|
| return false;
|
| @@ -425,6 +425,18 @@ bool TextTrack::isRendered()
|
| return true;
|
| }
|
|
|
| +bool TextTrack::canBeRendered() const
|
| +{
|
| + // A track can be displayed when it's of kind captions or subtitles and hasn't failed to load.
|
| + if (kind() != captionsKeyword() && kind() != subtitlesKeyword())
|
| + return false;
|
| +
|
| + if (getReadinessState() == FailedToLoad)
|
| + return false;
|
| +
|
| + return true;
|
| +}
|
| +
|
| TextTrackCueList* TextTrack::ensureTextTrackCueList()
|
| {
|
| if (!m_cues)
|
|
|