| 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 TextTrackCueList* cues = track()->cues(); | 483 m_cueIndex = track()->cues()->getCueIndex(this); |
| 484 if (cues) | |
| 485 m_cueIndex = cues->getCueIndex(this); | |
| 486 } | |
| 487 | 484 |
| 488 return m_cueIndex; | 485 return m_cueIndex; |
| 489 } | 486 } |
| 490 | 487 |
| 491 void TextTrackCue::invalidateCueIndex() | 488 void TextTrackCue::invalidateCueIndex() |
| 492 { | 489 { |
| 493 m_cueIndex = invalidCueIndex; | 490 m_cueIndex = invalidCueIndex; |
| 494 } | 491 } |
| 495 | 492 |
| 496 void TextTrackCue::createWebVTTNodeTree() | 493 void TextTrackCue::createWebVTTNodeTree() |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 return false; | 1181 return false; |
| 1185 if (m_cueSize != cue.size()) | 1182 if (m_cueSize != cue.size()) |
| 1186 return false; | 1183 return false; |
| 1187 if (align() != cue.align()) | 1184 if (align() != cue.align()) |
| 1188 return false; | 1185 return false; |
| 1189 | 1186 |
| 1190 return true; | 1187 return true; |
| 1191 } | 1188 } |
| 1192 | 1189 |
| 1193 } // namespace WebCore | 1190 } // namespace WebCore |
| 1194 | |
| OLD | NEW |