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

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

Issue 23513013: Have Text constructor take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/track/WebVTTParser.h ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/WebVTTParser.cpp
diff --git a/Source/core/html/track/WebVTTParser.cpp b/Source/core/html/track/WebVTTParser.cpp
index 4b8cae050e6bb6bc9d93627fc4b21a3c8dd2ccf2..f9c2819b5a28fffe364b1af91e878eb15595132c 100644
--- a/Source/core/html/track/WebVTTParser.cpp
+++ b/Source/core/html/track/WebVTTParser.cpp
@@ -335,7 +335,7 @@ PassRefPtr<DocumentFragment> WebVTTParser::createDocumentFragmentFromCueText(co
RefPtr<DocumentFragment> fragment = DocumentFragment::create(*document);
if (!text.length()) {
- fragment->parserAppendChild(Text::create(document, ""));
+ fragment->parserAppendChild(Text::create(*document, ""));
return fragment;
}
@@ -346,7 +346,7 @@ PassRefPtr<DocumentFragment> WebVTTParser::createDocumentFragmentFromCueText(co
m_languageStack.clear();
SegmentedString content(text);
while (m_tokenizer->nextToken(content, m_token))
- constructTreeFromToken(document);
+ constructTreeFromToken(*document);
return fragment.release();
}
@@ -484,7 +484,7 @@ static WebVTTNodeType tokenToNodeType(WebVTTToken& token)
return WebVTTNodeTypeNone;
}
-void WebVTTParser::constructTreeFromToken(Document* document)
+void WebVTTParser::constructTreeFromToken(Document& document)
{
QualifiedName tagName(nullAtom, AtomicString(m_token.name()), xhtmlNamespaceURI);
@@ -501,7 +501,7 @@ void WebVTTParser::constructTreeFromToken(Document* document)
RefPtr<WebVTTElement> child;
WebVTTNodeType nodeType = tokenToNodeType(m_token);
if (nodeType != WebVTTNodeTypeNone)
- child = WebVTTElement::create(nodeType, document);
+ child = WebVTTElement::create(nodeType, &document);
if (child) {
if (m_token.classes().size() > 0)
child->setAttribute(classAttr, AtomicString(m_token.classes()));
@@ -534,7 +534,7 @@ void WebVTTParser::constructTreeFromToken(Document* document)
String charactersString(StringImpl::create8BitIfPossible(m_token.characters()));
double time = collectTimeStamp(charactersString, &position);
if (time != malformedTime)
- m_currentNode->parserAppendChild(ProcessingInstruction::create(document, "timestamp", charactersString));
+ m_currentNode->parserAppendChild(ProcessingInstruction::create(&document, "timestamp", charactersString));
break;
}
default:
« no previous file with comments | « Source/core/html/track/WebVTTParser.h ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698