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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 cueWillChange(); | 472 cueWillChange(); |
473 // Clear the document fragment but don't bother to create it again just yet
as we can do that | 473 // Clear the document fragment but don't bother to create it again just yet
as we can do that |
474 // when it is requested. | 474 // when it is requested. |
475 m_webVTTNodeTree = 0; | 475 m_webVTTNodeTree = 0; |
476 m_content = text; | 476 m_content = text; |
477 cueDidChange(); | 477 cueDidChange(); |
478 } | 478 } |
479 | 479 |
480 int TextTrackCue::cueIndex() | 480 int TextTrackCue::cueIndex() |
481 { | 481 { |
482 if (m_cueIndex == invalidCueIndex) | 482 if (m_cueIndex == invalidCueIndex) { |
483 m_cueIndex = track()->cues()->getCueIndex(this); | 483 TextTrackCueList* cues = track()->cues(); |
| 484 if (cues) |
| 485 m_cueIndex = cues->getCueIndex(this); |
| 486 } |
484 | 487 |
485 return m_cueIndex; | 488 return m_cueIndex; |
486 } | 489 } |
487 | 490 |
488 void TextTrackCue::invalidateCueIndex() | 491 void TextTrackCue::invalidateCueIndex() |
489 { | 492 { |
490 m_cueIndex = invalidCueIndex; | 493 m_cueIndex = invalidCueIndex; |
491 } | 494 } |
492 | 495 |
493 void TextTrackCue::createWebVTTNodeTree() | 496 void TextTrackCue::createWebVTTNodeTree() |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 if (m_cueSize != cue.size()) | 1185 if (m_cueSize != cue.size()) |
1183 return false; | 1186 return false; |
1184 if (align() != cue.align()) | 1187 if (align() != cue.align()) |
1185 return false; | 1188 return false; |
1186 | 1189 |
1187 return true; | 1190 return true; |
1188 } | 1191 } |
1189 | 1192 |
1190 } // namespace WebCore | 1193 } // namespace WebCore |
1191 | 1194 |
OLD | NEW |