Chromium Code Reviews| 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()) && readine ssState() != FailedToLoad) | |
|
fs
2016/02/24 10:14:57
Could you write this like:
if (kind() != captions
srivats
2016/02/25 21:47:56
Done.
| |
| 432 return true; | |
| 433 return false; | |
| 434 } | |
| 435 | |
| 428 TextTrackCueList* TextTrack::ensureTextTrackCueList() | 436 TextTrackCueList* TextTrack::ensureTextTrackCueList() |
| 429 { | 437 { |
| 430 if (!m_cues) | 438 if (!m_cues) |
| 431 m_cues = TextTrackCueList::create(); | 439 m_cues = TextTrackCueList::create(); |
| 432 | 440 |
| 433 return m_cues.get(); | 441 return m_cues.get(); |
| 434 } | 442 } |
| 435 | 443 |
| 436 int TextTrack::trackIndexRelativeToRenderedTracks() | 444 int TextTrack::trackIndexRelativeToRenderedTracks() |
| 437 { | 445 { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 { | 481 { |
| 474 visitor->trace(m_cues); | 482 visitor->trace(m_cues); |
| 475 visitor->trace(m_activeCues); | 483 visitor->trace(m_activeCues); |
| 476 visitor->trace(m_regions); | 484 visitor->trace(m_regions); |
| 477 visitor->trace(m_trackList); | 485 visitor->trace(m_trackList); |
| 478 TrackBase::trace(visitor); | 486 TrackBase::trace(visitor); |
| 479 RefCountedGarbageCollectedEventTargetWithInlineData<TextTrack>::trace(visito r); | 487 RefCountedGarbageCollectedEventTargetWithInlineData<TextTrack>::trace(visito r); |
| 480 } | 488 } |
| 481 | 489 |
| 482 } // namespace blink | 490 } // namespace blink |
| OLD | NEW |