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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
436 int TextTrack::trackIndexRelativeToRenderedTracks() | 436 int TextTrack::trackIndexRelativeToRenderedTracks() |
437 { | 437 { |
438 ASSERT(m_trackList); | 438 ASSERT(m_trackList); |
439 | 439 |
440 if (m_renderedTrackIndex == invalidTrackIndex) | 440 if (m_renderedTrackIndex == invalidTrackIndex) |
441 m_renderedTrackIndex = m_trackList->getTrackIndexRelativeToRenderedTrack s(this); | 441 m_renderedTrackIndex = m_trackList->getTrackIndexRelativeToRenderedTrack s(this); |
442 | 442 |
443 return m_renderedTrackIndex; | 443 return m_renderedTrackIndex; |
444 } | 444 } |
445 | 445 |
446 bool TextTrack::isRenderable() | |
fs
2016/02/23 13:16:44
Maybe move this closer to isRendered() and format
srivats
2016/02/24 05:20:18
Done.
| |
447 { | |
448 // A track can be displayed when it's of kind captions or subtitles and hasn 't failed to load | |
fs
2016/02/23 13:16:44
uNit: Add full stop.
srivats
2016/02/24 05:20:18
Done.
| |
449 if ((kind() == captionsKeyword() || kind() == subtitlesKeyword()) && readine ssState() != FailedToLoad) | |
450 return true; | |
451 return false; | |
452 } | |
453 | |
446 const AtomicString& TextTrack::interfaceName() const | 454 const AtomicString& TextTrack::interfaceName() const |
447 { | 455 { |
448 return EventTargetNames::TextTrack; | 456 return EventTargetNames::TextTrack; |
449 } | 457 } |
450 | 458 |
451 ExecutionContext* TextTrack::executionContext() const | 459 ExecutionContext* TextTrack::executionContext() const |
452 { | 460 { |
453 HTMLMediaElement* owner = mediaElement(); | 461 HTMLMediaElement* owner = mediaElement(); |
454 return owner ? owner->executionContext() : 0; | 462 return owner ? owner->executionContext() : 0; |
455 } | 463 } |
(...skipping 17 matching lines...) Expand all 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 |