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

Side by Side Diff: sky/engine/core/html/parser/HTMLTreeBuilder.h

Issue 680583003: Delete ScriptableDocumentParser (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Sort headers Created 6 years, 1 month 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) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class Element; 47 class Element;
48 class LocalFrame; 48 class LocalFrame;
49 class HTMLToken; 49 class HTMLToken;
50 class HTMLDocument; 50 class HTMLDocument;
51 class Node; 51 class Node;
52 class HTMLDocumentParser; 52 class HTMLDocumentParser;
53 53
54 class HTMLTreeBuilder FINAL : public NoBaseWillBeGarbageCollectedFinalized<HTMLT reeBuilder> { 54 class HTMLTreeBuilder FINAL : public NoBaseWillBeGarbageCollectedFinalized<HTMLT reeBuilder> {
55 WTF_MAKE_NONCOPYABLE(HTMLTreeBuilder); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOV ED; 55 WTF_MAKE_NONCOPYABLE(HTMLTreeBuilder); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOV ED;
56 public: 56 public:
57 static PassOwnPtrWillBeRawPtr<HTMLTreeBuilder> create(HTMLDocumentParser* pa rser, HTMLDocument* document, ParserContentPolicy parserContentPolicy, bool repo rtErrors, const HTMLParserOptions& options) 57 static PassOwnPtrWillBeRawPtr<HTMLTreeBuilder> create(HTMLDocumentParser* pa rser, HTMLDocument* document, bool reportErrors, const HTMLParserOptions& option s)
58 { 58 {
59 return adoptPtrWillBeNoop(new HTMLTreeBuilder(parser, document, parserCo ntentPolicy, reportErrors, options)); 59 return adoptPtrWillBeNoop(new HTMLTreeBuilder(parser, document, reportEr rors, options));
60 } 60 }
61 static PassOwnPtrWillBeRawPtr<HTMLTreeBuilder> create(HTMLDocumentParser* pa rser, DocumentFragment* fragment, Element* contextElement, ParserContentPolicy p arserContentPolicy, const HTMLParserOptions& options) 61 static PassOwnPtrWillBeRawPtr<HTMLTreeBuilder> create(HTMLDocumentParser* pa rser, DocumentFragment* fragment, Element* contextElement, const HTMLParserOptio ns& options)
62 { 62 {
63 return adoptPtrWillBeNoop(new HTMLTreeBuilder(parser, fragment, contextE lement, parserContentPolicy, options)); 63 return adoptPtrWillBeNoop(new HTMLTreeBuilder(parser, fragment, contextE lement, options));
64 } 64 }
65 ~HTMLTreeBuilder(); 65 ~HTMLTreeBuilder();
66 void trace(Visitor*); 66 void trace(Visitor*);
67 67
68 const HTMLElementStack* openElements() const { return m_tree.openElements(); } 68 const HTMLElementStack* openElements() const { return m_tree.openElements(); }
69 69
70 bool isParsingFragment() const { return !!m_fragmentContext.fragment(); } 70 bool isParsingFragment() const { return !!m_fragmentContext.fragment(); }
71 71
72 void detach(); 72 void detach();
73 73
(...skipping 11 matching lines...) Expand all
85 85
86 private: 86 private:
87 class CharacterTokenBuffer; 87 class CharacterTokenBuffer;
88 // Represents HTML5 "insertion mode" 88 // Represents HTML5 "insertion mode"
89 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html# insertion-mode 89 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html# insertion-mode
90 enum InsertionMode { 90 enum InsertionMode {
91 HTMLMode, 91 HTMLMode,
92 TextMode, 92 TextMode,
93 }; 93 };
94 94
95 HTMLTreeBuilder(HTMLDocumentParser*, HTMLDocument*, ParserContentPolicy, boo l reportErrors, const HTMLParserOptions&); 95 HTMLTreeBuilder(HTMLDocumentParser*, HTMLDocument*, bool reportErrors, const HTMLParserOptions&);
96 HTMLTreeBuilder(HTMLDocumentParser*, DocumentFragment*, Element* contextElem ent, ParserContentPolicy, const HTMLParserOptions&); 96 HTMLTreeBuilder(HTMLDocumentParser*, DocumentFragment*, Element* contextElem ent, const HTMLParserOptions&);
97 97
98 void processStartTag(AtomicHTMLToken*); 98 void processStartTag(AtomicHTMLToken*);
99 void processEndTag(AtomicHTMLToken*); 99 void processEndTag(AtomicHTMLToken*);
100 void processCharacter(AtomicHTMLToken*); 100 void processCharacter(AtomicHTMLToken*);
101 void processEndOfFile(AtomicHTMLToken*); 101 void processEndOfFile(AtomicHTMLToken*);
102 102
103 void processGenericRawTextStartTag(AtomicHTMLToken*); 103 void processGenericRawTextStartTag(AtomicHTMLToken*);
104 void processScriptStartTag(AtomicHTMLToken*); 104 void processScriptStartTag(AtomicHTMLToken*);
105 105
106 InsertionMode insertionMode() const { return m_insertionMode; } 106 InsertionMode insertionMode() const { return m_insertionMode; }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p rocessing before resuming the parser. 141 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p rocessing before resuming the parser.
142 TextPosition m_scriptToProcessStartPosition; // Starting line number of the script tag needing processing. 142 TextPosition m_scriptToProcessStartPosition; // Starting line number of the script tag needing processing.
143 143
144 HTMLParserOptions m_options; 144 HTMLParserOptions m_options;
145 }; 145 };
146 146
147 } 147 }
148 148
149 #endif 149 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/HTMLDocumentParser.cpp ('k') | sky/engine/core/html/parser/HTMLTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698