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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 284 } |
285 // Step 35. | 285 // Step 35. |
286 if (line.contains("-->")) { | 286 if (line.contains("-->")) { |
287 // Step 39-40. | 287 // Step 39-40. |
288 createNewCue(); | 288 createNewCue(); |
289 | 289 |
290 // Step 41 - New iteration of the cue loop. | 290 // Step 41 - New iteration of the cue loop. |
291 return recoverCue(line); | 291 return recoverCue(line); |
292 } | 292 } |
293 if (!m_currentContent.isEmpty()) | 293 if (!m_currentContent.isEmpty()) |
294 m_currentContent.append("\n"); | 294 m_currentContent.append('\n'); |
295 m_currentContent.append(line); | 295 m_currentContent.append(line); |
296 | 296 |
297 return CueText; | 297 return CueText; |
298 } | 298 } |
299 | 299 |
300 VTTParser::ParseState VTTParser::recoverCue(const String& line) | 300 VTTParser::ParseState VTTParser::recoverCue(const String& line) |
301 { | 301 { |
302 // Step 17 and 21. | 302 // Step 17 and 21. |
303 resetCueValues(); | 303 resetCueValues(); |
304 | 304 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 } | 560 } |
561 | 561 |
562 void VTTParser::trace(Visitor* visitor) | 562 void VTTParser::trace(Visitor* visitor) |
563 { | 563 { |
564 visitor->trace(m_document); | 564 visitor->trace(m_document); |
565 visitor->trace(m_cueList); | 565 visitor->trace(m_cueList); |
566 visitor->trace(m_regionList); | 566 visitor->trace(m_regionList); |
567 } | 567 } |
568 | 568 |
569 } | 569 } |
OLD | NEW |