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, 2007 Apple Inc. All rights reserved. | 3 * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved. |
4 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 4 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
5 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 5 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 XMLParserContext(xmlParserCtxtPtr context) | 59 XMLParserContext(xmlParserCtxtPtr context) |
60 : m_context(context) | 60 : m_context(context) |
61 { | 61 { |
62 } | 62 } |
63 xmlParserCtxtPtr m_context; | 63 xmlParserCtxtPtr m_context; |
64 }; | 64 }; |
65 | 65 |
66 class XMLDocumentParser FINAL : public ScriptableDocumentParser, public Reso
urceClient { | 66 class XMLDocumentParser FINAL : public ScriptableDocumentParser, public Reso
urceClient { |
67 WTF_MAKE_FAST_ALLOCATED; | 67 WTF_MAKE_FAST_ALLOCATED; |
68 public: | 68 public: |
69 static PassRefPtr<XMLDocumentParser> create(Document* document, FrameVie
w* view) | 69 static PassRefPtr<XMLDocumentParser> create(Document& document, FrameVie
w* view) |
70 { | 70 { |
71 return adoptRef(new XMLDocumentParser(document, view)); | 71 return adoptRef(new XMLDocumentParser(document, view)); |
72 } | 72 } |
73 static PassRefPtr<XMLDocumentParser> create(DocumentFragment* fragment,
Element* element, ParserContentPolicy parserContentPolicy) | 73 static PassRefPtr<XMLDocumentParser> create(DocumentFragment* fragment,
Element* element, ParserContentPolicy parserContentPolicy) |
74 { | 74 { |
75 return adoptRef(new XMLDocumentParser(fragment, element, parserConte
ntPolicy)); | 75 return adoptRef(new XMLDocumentParser(fragment, element, parserConte
ntPolicy)); |
76 } | 76 } |
77 | 77 |
78 virtual ~XMLDocumentParser(); | 78 virtual ~XMLDocumentParser(); |
79 | 79 |
(...skipping 14 matching lines...) Expand all Loading... |
94 | 94 |
95 static bool supportsXMLVersion(const String&); | 95 static bool supportsXMLVersion(const String&); |
96 | 96 |
97 class PendingCallback { | 97 class PendingCallback { |
98 public: | 98 public: |
99 virtual ~PendingCallback() { } | 99 virtual ~PendingCallback() { } |
100 virtual void call(XMLDocumentParser*) = 0; | 100 virtual void call(XMLDocumentParser*) = 0; |
101 }; | 101 }; |
102 | 102 |
103 private: | 103 private: |
104 XMLDocumentParser(Document*, FrameView* = 0); | 104 explicit XMLDocumentParser(Document&, FrameView* = 0); |
105 XMLDocumentParser(DocumentFragment*, Element*, ParserContentPolicy); | 105 XMLDocumentParser(DocumentFragment*, Element*, ParserContentPolicy); |
106 | 106 |
107 // From DocumentParser | 107 // From DocumentParser |
108 virtual void insert(const SegmentedString&) OVERRIDE; | 108 virtual void insert(const SegmentedString&) OVERRIDE; |
109 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; | 109 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; |
110 virtual void finish() OVERRIDE; | 110 virtual void finish() OVERRIDE; |
111 virtual bool isWaitingForScripts() const OVERRIDE; | 111 virtual bool isWaitingForScripts() const OVERRIDE; |
112 virtual void stopParsing() OVERRIDE; | 112 virtual void stopParsing() OVERRIDE; |
113 virtual void detach() OVERRIDE; | 113 virtual void detach() OVERRIDE; |
114 virtual OrdinalNumber lineNumber() const OVERRIDE; | 114 virtual OrdinalNumber lineNumber() const OVERRIDE; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 SegmentedString m_pendingSrc; | 191 SegmentedString m_pendingSrc; |
192 }; | 192 }; |
193 | 193 |
194 xmlDocPtr xmlDocPtrForString(ResourceFetcher*, const String& source, const Strin
g& url); | 194 xmlDocPtr xmlDocPtrForString(ResourceFetcher*, const String& source, const Strin
g& url); |
195 | 195 |
196 HashMap<String, String> parseAttributes(const String&, bool& attrsOK); | 196 HashMap<String, String> parseAttributes(const String&, bool& attrsOK); |
197 | 197 |
198 } // namespace WebCore | 198 } // namespace WebCore |
199 | 199 |
200 #endif // XMLDocumentParser_h | 200 #endif // XMLDocumentParser_h |
OLD | NEW |