OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 { | 418 { |
419 if (kind() != captionsKeyword() && kind() != subtitlesKeyword()) | 419 if (kind() != captionsKeyword() && kind() != subtitlesKeyword()) |
420 return false; | 420 return false; |
421 | 421 |
422 if (m_mode != showingKeyword()) | 422 if (m_mode != showingKeyword()) |
423 return false; | 423 return false; |
424 | 424 |
425 return true; | 425 return true; |
426 } | 426 } |
427 | 427 |
428 bool TextTrack::canBeRendered() | |
429 { | |
430 // A track can be displayed when it's of kind captions or subtitles and hasn 't failed to load. | |
431 if (kind() != captionsKeyword() && kind() != subtitlesKeyword()) | |
432 return false; | |
433 | |
434 if (readinessState() == FailedToLoad) | |
philipj_slow
2016/03/01 08:51:40
This has been renamed to getReadinessState() in ht
srivats
2016/03/30 00:46:43
Done.
| |
435 return false; | |
436 | |
437 return true; | |
438 } | |
439 | |
428 TextTrackCueList* TextTrack::ensureTextTrackCueList() | 440 TextTrackCueList* TextTrack::ensureTextTrackCueList() |
429 { | 441 { |
430 if (!m_cues) | 442 if (!m_cues) |
431 m_cues = TextTrackCueList::create(); | 443 m_cues = TextTrackCueList::create(); |
432 | 444 |
433 return m_cues.get(); | 445 return m_cues.get(); |
434 } | 446 } |
435 | 447 |
436 int TextTrack::trackIndexRelativeToRenderedTracks() | 448 int TextTrack::trackIndexRelativeToRenderedTracks() |
437 { | 449 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 { | 485 { |
474 visitor->trace(m_cues); | 486 visitor->trace(m_cues); |
475 visitor->trace(m_activeCues); | 487 visitor->trace(m_activeCues); |
476 visitor->trace(m_regions); | 488 visitor->trace(m_regions); |
477 visitor->trace(m_trackList); | 489 visitor->trace(m_trackList); |
478 TrackBase::trace(visitor); | 490 TrackBase::trace(visitor); |
479 RefCountedGarbageCollectedEventTargetWithInlineData<TextTrack>::trace(visito r); | 491 RefCountedGarbageCollectedEventTargetWithInlineData<TextTrack>::trace(visito r); |
480 } | 492 } |
481 | 493 |
482 } // namespace blink | 494 } // namespace blink |
OLD | NEW |