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

Side by Side Diff: Source/core/dom/DocumentParser.h

Issue 799803004: Demistify DocumentParser::append (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2005, 2006 Apple Computer, Inc. 3 * Copyright (C) 2005, 2006 Apple Computer, Inc.
4 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 4 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
5 * Copyright (C) 2010 Google, Inc. 5 * Copyright (C) 2010 Google, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // insert is used by document.write. 49 // insert is used by document.write.
50 virtual void insert(const SegmentedString&) = 0; 50 virtual void insert(const SegmentedString&) = 0;
51 51
52 // The below functions are used by DocumentWriter (the loader). 52 // The below functions are used by DocumentWriter (the loader).
53 virtual void appendBytes(const char* bytes, size_t length) = 0; 53 virtual void appendBytes(const char* bytes, size_t length) = 0;
54 virtual bool needsDecoder() const { return false; } 54 virtual bool needsDecoder() const { return false; }
55 virtual void setDecoder(PassOwnPtr<TextResourceDecoder>); 55 virtual void setDecoder(PassOwnPtr<TextResourceDecoder>);
56 virtual TextResourceDecoder* decoder(); 56 virtual TextResourceDecoder* decoder();
57 virtual void setHasAppendedData() { } 57 virtual void setHasAppendedData() { }
58 58
59 // FIXME: append() should be private, but DocumentLoader::replaceDocumentWhi leExecutingJavaScriptURL uses it for now. 59 virtual void append(const String&) = 0;
kouhei (in TOK) 2014/12/18 04:34:35 Why should this FIXME be removed?
kbalazs 2014/12/18 23:28:28 I answered that in the changelog :) "Also remove
kouhei (in TOK) 2014/12/19 04:44:27 I think this comment is still relevant. So would y
60 // FIXME: This really should take a PassOwnPtr to signify that it expects to take
61 // ownership of the buffer. The parser expects the PassRefPtr to hold the on ly ref of the StringImpl.
kouhei (in TOK) 2014/12/18 04:34:35 I'm ok with removing this FIXME.
62 virtual void append(PassRefPtr<StringImpl>) = 0;
63 60
64 virtual void finish() = 0; 61 virtual void finish() = 0;
65 62
66 // FIXME: processingData() is only used by DocumentLoader::isLoadingInAPISen se 63 // FIXME: processingData() is only used by DocumentLoader::isLoadingInAPISen se
67 // and is very unclear as to what it actually means. The LegacyHTMLDocument Parser 64 // and is very unclear as to what it actually means. The LegacyHTMLDocument Parser
68 // used to implement it. 65 // used to implement it.
69 virtual bool processingData() const { return false; } 66 virtual bool processingData() const { return false; }
70 67
71 // document() will return 0 after detach() is called. 68 // document() will return 0 after detach() is called.
72 Document* document() const { ASSERT(m_document); return m_document; } 69 Document* document() const { ASSERT(m_document); return m_document; }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Every DocumentParser needs a pointer back to the document. 119 // Every DocumentParser needs a pointer back to the document.
123 // m_document will be 0 after the parser is stopped. 120 // m_document will be 0 after the parser is stopped.
124 RawPtrWillBeMember<Document> m_document; 121 RawPtrWillBeMember<Document> m_document;
125 122
126 WillBeHeapHashSet<RawPtrWillBeWeakMember<DocumentParserClient> > m_clients; 123 WillBeHeapHashSet<RawPtrWillBeWeakMember<DocumentParserClient> > m_clients;
127 }; 124 };
128 125
129 } // namespace blink 126 } // namespace blink
130 127
131 #endif // DocumentParser_h 128 #endif // DocumentParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698