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

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

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months 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
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « Source/core/html/parser/XSSAuditorDelegate.cpp ('k') | Source/core/inspector/ContentSearchUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698