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

Unified Diff: Source/core/html/track/WebVTTParser.cpp

Issue 62833005: The WebVTT parsing algorithm allows empty cue text (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/track/WebVTTParser.cpp
diff --git a/Source/core/html/track/WebVTTParser.cpp b/Source/core/html/track/WebVTTParser.cpp
index b3f0632def09785ca527886cc6e981a44ed51bf9..54f52e4243e9401359b0889eb91c1e9a642216f4 100644
--- a/Source/core/html/track/WebVTTParser.cpp
+++ b/Source/core/html/track/WebVTTParser.cpp
@@ -372,9 +372,6 @@ PassRefPtr<DocumentFragment> WebVTTParser::createDocumentFragmentFromCueText(Doc
void WebVTTParser::createNewCue()
{
- if (!m_currentContent.length())
- return;
-
RefPtr<TextTrackCue> cue = TextTrackCue::create(*m_document, m_currentStartTime, m_currentEndTime, m_currentContent.toString());
cue->setId(m_currentId);
cue->setCueSettings(m_currentSettings);

Powered by Google App Engine
This is Rietveld 408576698