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

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

Issue 1823863002: Simplify parsing/loading state, attempt #2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes Created 4 years, 9 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 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 and DOMPatchSupport uses it for now. 59 // FIXME: append() should be private, but DocumentLoader and DOMPatchSupport uses it for now.
60 virtual void append(const String&) = 0; 60 virtual void append(const String&) = 0;
61 61
62 virtual void finish() = 0; 62 virtual void finish() = 0;
63 63
64 // FIXME: processingData() is only used by DocumentLoader::isLoadingInAPISen se
65 // and is very unclear as to what it actually means. The LegacyHTMLDocument Parser
66 // used to implement it.
67 virtual bool processingData() const { return false; }
68
69 // document() will return 0 after detach() is called. 64 // document() will return 0 after detach() is called.
70 Document* document() const { ASSERT(m_document); return m_document; } 65 Document* document() const { ASSERT(m_document); return m_document; }
71 66
72 bool isParsing() const { return m_state == ParsingState; } 67 bool isParsing() const { return m_state == ParsingState; }
73 bool isStopping() const { return m_state == StoppingState; } 68 bool isStopping() const { return m_state == StoppingState; }
74 bool isStopped() const { return m_state >= StoppedState; } 69 bool isStopped() const { return m_state >= StoppedState; }
75 bool isDetached() const { return m_state == DetachedState; } 70 bool isDetached() const { return m_state == DetachedState; }
76 71
77 // prepareToStop() is used when the EOF token is encountered and parsing is to be 72 // prepareToStop() is used when the EOF token is encountered and parsing is to be
78 // stopped normally. 73 // stopped normally.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Every DocumentParser needs a pointer back to the document. 113 // Every DocumentParser needs a pointer back to the document.
119 // m_document will be 0 after the parser is stopped. 114 // m_document will be 0 after the parser is stopped.
120 RawPtrWillBeMember<Document> m_document; 115 RawPtrWillBeMember<Document> m_document;
121 116
122 WillBeHeapHashSet<RawPtrWillBeWeakMember<DocumentParserClient>> m_clients; 117 WillBeHeapHashSet<RawPtrWillBeWeakMember<DocumentParserClient>> m_clients;
123 }; 118 };
124 119
125 } // namespace blink 120 } // namespace blink
126 121
127 #endif // DocumentParser_h 122 #endif // DocumentParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698