| Index: Source/core/html/track/WebVTTParser.cpp
|
| diff --git a/Source/core/html/track/WebVTTParser.cpp b/Source/core/html/track/WebVTTParser.cpp
|
| index 4a7b524f5922c12f1894f8bc1d2e4719f9ec68e1..4b2dfc22fc6148a2aba985b4302aba35f032b9a3 100644
|
| --- a/Source/core/html/track/WebVTTParser.cpp
|
| +++ b/Source/core/html/track/WebVTTParser.cpp
|
| @@ -328,13 +328,16 @@ PassRefPtr<DocumentFragment> WebVTTParser::createDocumentFragmentFromCueText(co
|
| // 4.8.10.13.4 WebVTT cue text parsing rules and
|
| // 4.8.10.13.5 WebVTT cue text DOM construction rules.
|
|
|
| - if (!text.length())
|
| - return 0;
|
| -
|
| ASSERT(m_scriptExecutionContext->isDocument());
|
| Document* document = toDocument(m_scriptExecutionContext);
|
|
|
| RefPtr<DocumentFragment> fragment = DocumentFragment::create(document);
|
| +
|
| + if (!text.length()) {
|
| + fragment->parserAppendChild(Text::create(document, ""));
|
| + return fragment;
|
| + }
|
| +
|
| m_currentNode = fragment;
|
| m_tokenizer->reset();
|
| m_token.clear();
|
|
|