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

Unified Diff: Source/core/html/parser/HTMLDocumentParser.cpp

Issue 276733002: Convert XMLDocumentParser code to Use more reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments Created 6 years, 7 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/dom/ScriptableDocumentParser.cpp ('k') | Source/core/html/parser/HTMLViewSourceParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index 55a36a60b48cef5eebffa7034cb8dda3a1b93298..e6cf774d729dfddc4a31d296319336a5df384720 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -99,8 +99,9 @@ private:
WeakPtr<BackgroundHTMLParser> m_backgroundParser;
};
+// FIXME: HTMLDocument should be a reference.
HTMLDocumentParser::HTMLDocumentParser(HTMLDocument* document, bool reportErrors)
- : ScriptableDocumentParser(document)
+ : ScriptableDocumentParser(*document)
, m_options(document)
, m_token(m_options.useThreading ? nullptr : adoptPtr(new HTMLToken))
, m_tokenizer(m_options.useThreading ? nullptr : HTMLTokenizer::create(m_options))
@@ -121,7 +122,7 @@ HTMLDocumentParser::HTMLDocumentParser(HTMLDocument* document, bool reportErrors
// FIXME: Member variables should be grouped into self-initializing structs to
// minimize code duplication between these constructors.
HTMLDocumentParser::HTMLDocumentParser(DocumentFragment* fragment, Element* contextElement, ParserContentPolicy parserContentPolicy)
- : ScriptableDocumentParser(&fragment->document(), parserContentPolicy)
+ : ScriptableDocumentParser(fragment->document(), parserContentPolicy)
, m_options(&fragment->document())
, m_token(adoptPtr(new HTMLToken))
, m_tokenizer(HTMLTokenizer::create(m_options))
« no previous file with comments | « Source/core/dom/ScriptableDocumentParser.cpp ('k') | Source/core/html/parser/HTMLViewSourceParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698