| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 } | 90 } |
| 91 | 91 |
| 92 const AtomicString& TextTrack::showingKeyword() | 92 const AtomicString& TextTrack::showingKeyword() |
| 93 { | 93 { |
| 94 DEFINE_STATIC_LOCAL(const AtomicString, ended, ("showing", AtomicString::Con
structFromLiteral)); | 94 DEFINE_STATIC_LOCAL(const AtomicString, ended, ("showing", AtomicString::Con
structFromLiteral)); |
| 95 return ended; | 95 return ended; |
| 96 } | 96 } |
| 97 | 97 |
| 98 TextTrack::TextTrack(Document& document, TextTrackClient* client, const AtomicSt
ring& kind, const AtomicString& label, const AtomicString& language, const Atomi
cString& id, TextTrackType type) | 98 TextTrack::TextTrack(Document& document, TextTrackClient* client, const AtomicSt
ring& kind, const AtomicString& label, const AtomicString& language, const Atomi
cString& id, TextTrackType type) |
| 99 : TrackBase(TrackBase::TextTrack, label, language, id) | 99 : TrackBase(TrackBase::TextTrack, label, language, id) |
| 100 , m_cues(0) | 100 , m_cues(nullptr) |
| 101 , m_regions(0) | 101 , m_regions(nullptr) |
| 102 , m_document(&document) | 102 , m_document(&document) |
| 103 , m_trackList(0) | 103 , m_trackList(0) |
| 104 , m_mode(disabledKeyword()) | 104 , m_mode(disabledKeyword()) |
| 105 , m_client(client) | 105 , m_client(client) |
| 106 , m_trackType(type) | 106 , m_trackType(type) |
| 107 , m_readinessState(NotLoaded) | 107 , m_readinessState(NotLoaded) |
| 108 , m_trackIndex(invalidTrackIndex) | 108 , m_trackIndex(invalidTrackIndex) |
| 109 , m_renderedTrackIndex(invalidTrackIndex) | 109 , m_renderedTrackIndex(invalidTrackIndex) |
| 110 , m_hasBeenConfigured(false) | 110 , m_hasBeenConfigured(false) |
| 111 { | 111 { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 { | 195 { |
| 196 if (!m_cues) | 196 if (!m_cues) |
| 197 return; | 197 return; |
| 198 | 198 |
| 199 if (m_client) | 199 if (m_client) |
| 200 m_client->textTrackRemoveCues(this, m_cues.get()); | 200 m_client->textTrackRemoveCues(this, m_cues.get()); |
| 201 | 201 |
| 202 for (size_t i = 0; i < m_cues->length(); ++i) | 202 for (size_t i = 0; i < m_cues->length(); ++i) |
| 203 m_cues->item(i)->setTrack(0); | 203 m_cues->item(i)->setTrack(0); |
| 204 | 204 |
| 205 m_cues = 0; | 205 m_cues = nullptr; |
| 206 } | 206 } |
| 207 | 207 |
| 208 TextTrackCueList* TextTrack::activeCues() const | 208 TextTrackCueList* TextTrack::activeCues() const |
| 209 { | 209 { |
| 210 // 4.8.10.12.5 If the text track mode ... is not the text track disabled mod
e, | 210 // 4.8.10.12.5 If the text track mode ... is not the text track disabled mod
e, |
| 211 // then the activeCues attribute must return a live TextTrackCueList object
... | 211 // then the activeCues attribute must return a live TextTrackCueList object
... |
| 212 // ... whose active flag was set when the script started, in text track cue | 212 // ... whose active flag was set when the script started, in text track cue |
| 213 // order. Otherwise, it must return null. When an object is returned, the | 213 // order. Otherwise, it must return null. When an object is returned, the |
| 214 // same object must be returned each time. | 214 // same object must be returned each time. |
| 215 // http://www.whatwg.org/specs/web-apps/current-work/#dom-texttrack-activecu
es | 215 // http://www.whatwg.org/specs/web-apps/current-work/#dom-texttrack-activecu
es |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 return EventTargetNames::TextTrack; | 417 return EventTargetNames::TextTrack; |
| 418 } | 418 } |
| 419 | 419 |
| 420 ExecutionContext* TextTrack::executionContext() const | 420 ExecutionContext* TextTrack::executionContext() const |
| 421 { | 421 { |
| 422 return m_document; | 422 return m_document; |
| 423 } | 423 } |
| 424 | 424 |
| 425 } // namespace WebCore | 425 } // namespace WebCore |
| 426 | 426 |
| OLD | NEW |