| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 PassRefPtr<DocumentFragment> WebVTTParser::createDocumentFragmentFromCueText(Doc
ument& document, const String& cueText) | 371 PassRefPtr<DocumentFragment> WebVTTParser::createDocumentFragmentFromCueText(Doc
ument& document, const String& cueText) |
| 372 { | 372 { |
| 373 WebVTTTreeBuilder treeBuilder(document); | 373 WebVTTTreeBuilder treeBuilder(document); |
| 374 return treeBuilder.buildFromString(cueText); | 374 return treeBuilder.buildFromString(cueText); |
| 375 } | 375 } |
| 376 | 376 |
| 377 void WebVTTParser::createNewCue() | 377 void WebVTTParser::createNewCue() |
| 378 { | 378 { |
| 379 RefPtr<VTTCue> cue = VTTCue::create(*m_document, m_currentStartTime, m_curre
ntEndTime, m_currentContent.toString()); | 379 RefPtr<VTTCue> cue = VTTCue::create(*m_document, m_currentStartTime, m_curre
ntEndTime, m_currentContent.toString()); |
| 380 cue->setId(m_currentId); | 380 cue->setId(m_currentId); |
| 381 cue->setCueSettings(m_currentSettings); | 381 cue->parseSettings(m_currentSettings); |
| 382 | 382 |
| 383 m_cuelist.append(cue); | 383 m_cuelist.append(cue); |
| 384 if (m_client) | 384 if (m_client) |
| 385 m_client->newCuesParsed(); | 385 m_client->newCuesParsed(); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void WebVTTParser::resetCueValues() | 388 void WebVTTParser::resetCueValues() |
| 389 { | 389 { |
| 390 m_currentId = emptyString(); | 390 m_currentId = emptyString(); |
| 391 m_currentSettings = emptyString(); | 391 m_currentSettings = emptyString(); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 } | 565 } |
| 566 | 566 |
| 567 void WebVTTParser::skipWhiteSpace(const String& line, unsigned* position) | 567 void WebVTTParser::skipWhiteSpace(const String& line, unsigned* position) |
| 568 { | 568 { |
| 569 while (*position < line.length() && isASpace(line[*position])) | 569 while (*position < line.length() && isASpace(line[*position])) |
| 570 (*position)++; | 570 (*position)++; |
| 571 } | 571 } |
| 572 | 572 |
| 573 } | 573 } |
| 574 | 574 |
| OLD | NEW |