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

Side by Side Diff: Source/core/xml/parser/XMLDocumentParser.h

Issue 1224823006: Fix virtual/override/final usage in Source/core/xml/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/XSLStyleSheet.h ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(XMLDocumentParser); 69 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(XMLDocumentParser);
70 public: 70 public:
71 static PassRefPtrWillBeRawPtr<XMLDocumentParser> create(Document& document, FrameView* view) 71 static PassRefPtrWillBeRawPtr<XMLDocumentParser> create(Document& document, FrameView* view)
72 { 72 {
73 return adoptRefWillBeNoop(new XMLDocumentParser(document, view)); 73 return adoptRefWillBeNoop(new XMLDocumentParser(document, view));
74 } 74 }
75 static PassRefPtrWillBeRawPtr<XMLDocumentParser> create(DocumentFragment* fr agment, Element* element, ParserContentPolicy parserContentPolicy) 75 static PassRefPtrWillBeRawPtr<XMLDocumentParser> create(DocumentFragment* fr agment, Element* element, ParserContentPolicy parserContentPolicy)
76 { 76 {
77 return adoptRefWillBeNoop(new XMLDocumentParser(fragment, element, parse rContentPolicy)); 77 return adoptRefWillBeNoop(new XMLDocumentParser(fragment, element, parse rContentPolicy));
78 } 78 }
79 virtual ~XMLDocumentParser(); 79 ~XMLDocumentParser() override;
80 DECLARE_VIRTUAL_TRACE(); 80 DECLARE_VIRTUAL_TRACE();
81 81
82 // Exposed for callbacks: 82 // Exposed for callbacks:
83 void handleError(XMLErrors::ErrorType, const char* message, TextPosition); 83 void handleError(XMLErrors::ErrorType, const char* message, TextPosition);
84 84
85 void setIsXHTMLDocument(bool isXHTML) { m_isXHTMLDocument = isXHTML; } 85 void setIsXHTMLDocument(bool isXHTML) { m_isXHTMLDocument = isXHTML; }
86 bool isXHTMLDocument() const { return m_isXHTMLDocument; } 86 bool isXHTMLDocument() const { return m_isXHTMLDocument; }
87 87
88 bool isCurrentlyParsing8BitChunk() { return m_isCurrentlyParsing8BitChunk; } 88 bool isCurrentlyParsing8BitChunk() { return m_isCurrentlyParsing8BitChunk; }
89 89
90 static bool parseDocumentFragment(const String&, DocumentFragment*, Element* parent = 0, ParserContentPolicy = AllowScriptingContent); 90 static bool parseDocumentFragment(const String&, DocumentFragment*, Element* parent = 0, ParserContentPolicy = AllowScriptingContent);
91 91
92 // Used by the XMLHttpRequest to check if the responseXML was well formed. 92 // Used by the XMLHttpRequest to check if the responseXML was well formed.
93 virtual bool wellFormed() const override { return !m_sawError; } 93 bool wellFormed() const override { return !m_sawError; }
94 94
95 virtual TextPosition textPosition() const override; 95 TextPosition textPosition() const override;
96 96
97 static bool supportsXMLVersion(const String&); 97 static bool supportsXMLVersion(const String&);
98 98
99 class PendingCallback { 99 class PendingCallback {
100 public: 100 public:
101 virtual ~PendingCallback() { } 101 virtual ~PendingCallback() { }
102 virtual void call(XMLDocumentParser*) = 0; 102 virtual void call(XMLDocumentParser*) = 0;
103 }; 103 };
104 104
105 private: 105 private:
106 explicit XMLDocumentParser(Document&, FrameView* = 0); 106 explicit XMLDocumentParser(Document&, FrameView* = 0);
107 XMLDocumentParser(DocumentFragment*, Element*, ParserContentPolicy); 107 XMLDocumentParser(DocumentFragment*, Element*, ParserContentPolicy);
108 108
109 // From DocumentParser 109 // From DocumentParser
110 virtual void insert(const SegmentedString&) override; 110 void insert(const SegmentedString&) override;
111 virtual void append(const String&) override; 111 void append(const String&) override;
112 virtual void finish() override; 112 void finish() override;
113 virtual bool isWaitingForScripts() const override; 113 bool isWaitingForScripts() const override;
114 virtual void stopParsing() override; 114 void stopParsing() override;
115 virtual void detach() override; 115 void detach() override;
116 virtual OrdinalNumber lineNumber() const override; 116 OrdinalNumber lineNumber() const override;
117 OrdinalNumber columnNumber() const; 117 OrdinalNumber columnNumber() const;
118 118
119 // from ResourceClient 119 // from ResourceClient
120 virtual void notifyFinished(Resource*) override; 120 void notifyFinished(Resource*) override;
121 121
122 void end(); 122 void end();
123 123
124 void pauseParsing(); 124 void pauseParsing();
125 void resumeParsing(); 125 void resumeParsing();
126 126
127 bool appendFragmentSource(const String&); 127 bool appendFragmentSource(const String&);
128 128
129 public: 129 public:
130 // Callbacks from parser SAX 130 // Callbacks from parser SAX
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 PrefixForNamespaceMap m_prefixToNamespaceMap; 192 PrefixForNamespaceMap m_prefixToNamespaceMap;
193 SegmentedString m_pendingSrc; 193 SegmentedString m_pendingSrc;
194 }; 194 };
195 195
196 xmlDocPtr xmlDocPtrForString(Document*, const String& source, const String& url) ; 196 xmlDocPtr xmlDocPtrForString(Document*, const String& source, const String& url) ;
197 HashMap<String, String> parseAttributes(const String&, bool& attrsOK); 197 HashMap<String, String> parseAttributes(const String&, bool& attrsOK);
198 198
199 } // namespace blink 199 } // namespace blink
200 200
201 #endif // XMLDocumentParser_h 201 #endif // XMLDocumentParser_h
OLDNEW
« no previous file with comments | « Source/core/xml/XSLStyleSheet.h ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698