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

Unified Diff: Source/core/html/track/vtt/VTTParser.cpp

Issue 315843004: Oilpan: Replace RefPtrs to Node and its subclasses in core/html with Oilpan transitin types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/vtt/VTTElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/vtt/VTTParser.cpp
diff --git a/Source/core/html/track/vtt/VTTParser.cpp b/Source/core/html/track/vtt/VTTParser.cpp
index 1268d77b1a5942c08129a97bbcc686e11ee9dc73..c1ee90cbec02535a4b626c0e8a2551ed502863bb 100644
--- a/Source/core/html/track/vtt/VTTParser.cpp
+++ b/Source/core/html/track/vtt/VTTParser.cpp
@@ -317,19 +317,21 @@ VTTParser::ParseState VTTParser::ignoreBadCue(const String& line)
// A helper class for the construction of a "cue fragment" from the cue text.
class VTTTreeBuilder {
+ STACK_ALLOCATED();
public:
- VTTTreeBuilder(Document& document)
- : m_document(document) { }
+ explicit VTTTreeBuilder(Document& document)
+ : m_document(&document) { }
PassRefPtrWillBeRawPtr<DocumentFragment> buildFromString(const String& cueText);
private:
void constructTreeFromToken(Document&);
+ Document& document() const { return *m_document; }
VTTToken m_token;
- RefPtr<ContainerNode> m_currentNode;
+ RefPtrWillBeMember<ContainerNode> m_currentNode;
Vector<AtomicString> m_languageStack;
- Document& m_document;
+ RawPtrWillBeMember<Document> m_document;
};
PassRefPtrWillBeRawPtr<DocumentFragment> VTTTreeBuilder::buildFromString(const String& cueText)
@@ -338,10 +340,10 @@ PassRefPtrWillBeRawPtr<DocumentFragment> VTTTreeBuilder::buildFromString(const S
// 5.4 WebVTT cue text parsing rules, and
// 5.5 WebVTT cue text DOM construction rules
- RefPtrWillBeRawPtr<DocumentFragment> fragment = DocumentFragment::create(m_document);
+ RefPtrWillBeRawPtr<DocumentFragment> fragment = DocumentFragment::create(document());
if (cueText.isEmpty()) {
- fragment->parserAppendChild(Text::create(m_document, ""));
+ fragment->parserAppendChild(Text::create(document(), ""));
return fragment;
}
@@ -351,7 +353,7 @@ PassRefPtrWillBeRawPtr<DocumentFragment> VTTTreeBuilder::buildFromString(const S
m_languageStack.clear();
while (tokenizer.nextToken(m_token))
- constructTreeFromToken(m_document);
+ constructTreeFromToken(document());
return fragment.release();
}
« no previous file with comments | « Source/core/html/track/vtt/VTTElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698