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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 cueWillChange(); | 473 cueWillChange(); |
474 // Clear the document fragment but don't bother to create it again just yet as we can do that | 474 // Clear the document fragment but don't bother to create it again just yet as we can do that |
475 // when it is requested. | 475 // when it is requested. |
476 m_webVTTNodeTree = 0; | 476 m_webVTTNodeTree = 0; |
477 m_content = text; | 477 m_content = text; |
478 cueDidChange(); | 478 cueDidChange(); |
479 } | 479 } |
480 | 480 |
481 int TextTrackCue::cueIndex() | 481 int TextTrackCue::cueIndex() |
482 { | 482 { |
483 if (m_cueIndex == invalidCueIndex) | 483 if (m_cueIndex == invalidCueIndex) { |
484 m_cueIndex = track()->cues()->getCueIndex(this); | 484 if (TextTrackCueList* cues = track()->cues()) |
scherkus (not reviewing)
2013/06/14 00:28:00
I'm not sure if this is common Blink style, but it
Matthew Heaney (Chromium)
2013/06/21 19:27:39
I modified the code to match the coding style from
| |
485 m_cueIndex = cues->getCueIndex(this); | |
486 } | |
485 | 487 |
486 return m_cueIndex; | 488 return m_cueIndex; |
487 } | 489 } |
488 | 490 |
489 void TextTrackCue::invalidateCueIndex() | 491 void TextTrackCue::invalidateCueIndex() |
490 { | 492 { |
491 m_cueIndex = invalidCueIndex; | 493 m_cueIndex = invalidCueIndex; |
492 } | 494 } |
493 | 495 |
494 void TextTrackCue::createWebVTTNodeTree() | 496 void TextTrackCue::createWebVTTNodeTree() |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1183 if (m_cueSize != cue.size()) | 1185 if (m_cueSize != cue.size()) |
1184 return false; | 1186 return false; |
1185 if (align() != cue.align()) | 1187 if (align() != cue.align()) |
1186 return false; | 1188 return false; |
1187 | 1189 |
1188 return true; | 1190 return true; |
1189 } | 1191 } |
1190 | 1192 |
1191 } // namespace WebCore | 1193 } // namespace WebCore |
1192 | 1194 |
OLD | NEW |