| OLD | NEW |
| 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 11 matching lines...) Expand all Loading... |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #ifndef DocumentParser_h | 24 #ifndef DocumentParser_h |
| 25 #define DocumentParser_h | 25 #define DocumentParser_h |
| 26 | 26 |
| 27 #include "wtf/Forward.h" | 27 #include "wtf/Forward.h" |
| 28 #include "wtf/RefCounted.h" | 28 #include "wtf/RefCounted.h" |
| 29 | 29 |
| 30 namespace WebCore { | 30 namespace WebCore { |
| 31 | 31 |
| 32 class DecodedDataDocumentParser; |
| 32 class Document; | 33 class Document; |
| 33 class DocumentWriter; | 34 class DocumentWriter; |
| 34 class SegmentedString; | 35 class SegmentedString; |
| 35 class ScriptableDocumentParser; | 36 class ScriptableDocumentParser; |
| 36 | 37 |
| 37 class DocumentParser : public RefCounted<DocumentParser> { | 38 class DocumentParser : public RefCounted<DocumentParser> { |
| 38 public: | 39 public: |
| 39 virtual ~DocumentParser(); | 40 virtual ~DocumentParser(); |
| 40 | 41 |
| 42 virtual DecodedDataDocumentParser* asDecodedDataDocumentParser() { return 0;
} |
| 41 virtual ScriptableDocumentParser* asScriptableDocumentParser() { return 0; } | 43 virtual ScriptableDocumentParser* asScriptableDocumentParser() { return 0; } |
| 42 | 44 |
| 43 // http://www.whatwg.org/specs/web-apps/current-work/#insertion-point | 45 // http://www.whatwg.org/specs/web-apps/current-work/#insertion-point |
| 44 virtual bool hasInsertionPoint() { return true; } | 46 virtual bool hasInsertionPoint() { return true; } |
| 45 | 47 |
| 46 // insert is used by document.write. | 48 // insert is used by document.write. |
| 47 virtual void insert(const SegmentedString&) = 0; | 49 virtual void insert(const SegmentedString&) = 0; |
| 48 | 50 |
| 49 // appendBytes and flush are used by DocumentWriter (the loader). | 51 // appendBytes and flush are used by DocumentWriter (the loader). |
| 50 virtual size_t appendBytes(const char* bytes, size_t length) = 0; | 52 virtual size_t appendBytes(const char* bytes, size_t length) = 0; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 bool m_documentWasLoadedAsPartOfNavigation; | 117 bool m_documentWasLoadedAsPartOfNavigation; |
| 116 | 118 |
| 117 // Every DocumentParser needs a pointer back to the document. | 119 // Every DocumentParser needs a pointer back to the document. |
| 118 // m_document will be 0 after the parser is stopped. | 120 // m_document will be 0 after the parser is stopped. |
| 119 Document* m_document; | 121 Document* m_document; |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 } // namespace WebCore | 124 } // namespace WebCore |
| 123 | 125 |
| 124 #endif // DocumentParser_h | 126 #endif // DocumentParser_h |
| OLD | NEW |