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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 265 |
266 // 1. If the given cue is not currently listed in the method's TextTrack | 266 // 1. If the given cue is not currently listed in the method's TextTrack |
267 // object's text track's text track list of cues, then throw a NotFoundError
exception. | 267 // object's text track's text track list of cues, then throw a NotFoundError
exception. |
268 if (cue->track() != this) { | 268 if (cue->track() != this) { |
269 ec = NotFoundError; | 269 ec = NotFoundError; |
270 return; | 270 return; |
271 } | 271 } |
272 | 272 |
273 // 2. Remove cue from the method's TextTrack object's text track's text trac
k list of cues. | 273 // 2. Remove cue from the method's TextTrack object's text track's text trac
k list of cues. |
274 if (!m_cues || !m_cues->remove(cue)) { | 274 if (!m_cues || !m_cues->remove(cue)) { |
275 ec = INVALID_STATE_ERR; | 275 ec = InvalidStateError; |
276 return; | 276 return; |
277 } | 277 } |
278 | 278 |
279 cue->setTrack(0); | 279 cue->setTrack(0); |
280 if (m_client) | 280 if (m_client) |
281 m_client->textTrackRemoveCue(this, cue); | 281 m_client->textTrackRemoveCue(this, cue); |
282 } | 282 } |
283 | 283 |
284 #if ENABLE(WEBVTT_REGIONS) | 284 #if ENABLE(WEBVTT_REGIONS) |
285 TextTrackRegionList* TextTrack::regionList() | 285 TextTrackRegionList* TextTrack::regionList() |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 return; | 345 return; |
346 | 346 |
347 // 1. If the given region is not currently listed in the method's TextTrack | 347 // 1. If the given region is not currently listed in the method's TextTrack |
348 // object's text track list of regions, then throw a NotFoundError exception
. | 348 // object's text track list of regions, then throw a NotFoundError exception
. |
349 if (region->track() != this) { | 349 if (region->track() != this) { |
350 ec = NotFoundError; | 350 ec = NotFoundError; |
351 return; | 351 return; |
352 } | 352 } |
353 | 353 |
354 if (!m_regions || !m_regions->remove(region)) { | 354 if (!m_regions || !m_regions->remove(region)) { |
355 ec = INVALID_STATE_ERR; | 355 ec = InvalidStateError; |
356 return; | 356 return; |
357 } | 357 } |
358 | 358 |
359 region->setTrack(0); | 359 region->setTrack(0); |
360 } | 360 } |
361 #endif | 361 #endif |
362 | 362 |
363 void TextTrack::cueWillChange(TextTrackCue* cue) | 363 void TextTrack::cueWillChange(TextTrackCue* cue) |
364 { | 364 { |
365 if (!m_client) | 365 if (!m_client) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 { | 489 { |
490 // "Main program" content is intrinsic to the presentation of the media file
, regardless of locale. Content such as | 490 // "Main program" content is intrinsic to the presentation of the media file
, regardless of locale. Content such as |
491 // directors commentary is not "main program" because it is not essential fo
r the presentation. HTML5 doesn't have | 491 // directors commentary is not "main program" because it is not essential fo
r the presentation. HTML5 doesn't have |
492 // a way to express this in a machine-reable form, it is typically done with
the track label, so we assume that caption | 492 // a way to express this in a machine-reable form, it is typically done with
the track label, so we assume that caption |
493 // tracks are main content and all other track types are not. | 493 // tracks are main content and all other track types are not. |
494 return m_kind == captionsKeyword(); | 494 return m_kind == captionsKeyword(); |
495 } | 495 } |
496 | 496 |
497 } // namespace WebCore | 497 } // namespace WebCore |
498 | 498 |
OLD | NEW |