Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: Source/core/html/track/vtt/VTTParser.cpp

Issue 74623002: Remove the logic for de-duplicating in-band text track cues (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WebVTTParser.cpp was moved Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/track/TextTrackCue.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/track/TextTrackCue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698