OLD | NEW |
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 Loading... |
47 class Element; | 47 class Element; |
48 class Frame; | 48 class Frame; |
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 { | 54 class HTMLTreeBuilder { |
55 WTF_MAKE_NONCOPYABLE(HTMLTreeBuilder); WTF_MAKE_FAST_ALLOCATED; | 55 WTF_MAKE_NONCOPYABLE(HTMLTreeBuilder); WTF_MAKE_FAST_ALLOCATED; |
56 public: | 56 public: |
57 static PassOwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser* parser, HTMLDo
cument* document, ParserContentPolicy parserContentPolicy, bool reportErrors, co
nst HTMLParserOptions& options) | 57 static PassOwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser* parser, Docume
nt* document, ParserContentPolicy parserContentPolicy, bool reportErrors, const
HTMLParserOptions& options) |
58 { | 58 { |
59 return adoptPtr(new HTMLTreeBuilder(parser, document, parserContentPolic
y, reportErrors, options)); | 59 return adoptPtr(new HTMLTreeBuilder(parser, document, parserContentPolic
y, reportErrors, options)); |
60 } | 60 } |
61 static PassOwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser* parser, Docume
ntFragment* fragment, Element* contextElement, ParserContentPolicy parserContent
Policy, const HTMLParserOptions& options) | 61 static PassOwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser* parser, Docume
ntFragment* fragment, Element* contextElement, ParserContentPolicy parserContent
Policy, const HTMLParserOptions& options) |
62 { | 62 { |
63 return adoptPtr(new HTMLTreeBuilder(parser, fragment, contextElement, pa
rserContentPolicy, options)); | 63 return adoptPtr(new HTMLTreeBuilder(parser, fragment, contextElement, pa
rserContentPolicy, options)); |
64 } | 64 } |
65 ~HTMLTreeBuilder(); | 65 ~HTMLTreeBuilder(); |
66 | 66 |
67 const HTMLElementStack* openElements() const { return m_tree.openElements();
} | 67 const HTMLElementStack* openElements() const { return m_tree.openElements();
} |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 InCellMode, | 106 InCellMode, |
107 InSelectMode, | 107 InSelectMode, |
108 InSelectInTableMode, | 108 InSelectInTableMode, |
109 AfterBodyMode, | 109 AfterBodyMode, |
110 InFramesetMode, | 110 InFramesetMode, |
111 AfterFramesetMode, | 111 AfterFramesetMode, |
112 AfterAfterBodyMode, | 112 AfterAfterBodyMode, |
113 AfterAfterFramesetMode, | 113 AfterAfterFramesetMode, |
114 }; | 114 }; |
115 | 115 |
116 HTMLTreeBuilder(HTMLDocumentParser*, HTMLDocument*, ParserContentPolicy, boo
l reportErrors, const HTMLParserOptions&); | 116 HTMLTreeBuilder(HTMLDocumentParser*, Document*, ParserContentPolicy, bool re
portErrors, const HTMLParserOptions&); |
117 HTMLTreeBuilder(HTMLDocumentParser*, DocumentFragment*, Element* contextElem
ent, ParserContentPolicy, const HTMLParserOptions&); | 117 HTMLTreeBuilder(HTMLDocumentParser*, DocumentFragment*, Element* contextElem
ent, ParserContentPolicy, const HTMLParserOptions&); |
118 | 118 |
119 void processToken(AtomicHTMLToken*); | 119 void processToken(AtomicHTMLToken*); |
120 | 120 |
121 void processDoctypeToken(AtomicHTMLToken*); | 121 void processDoctypeToken(AtomicHTMLToken*); |
122 void processStartTag(AtomicHTMLToken*); | 122 void processStartTag(AtomicHTMLToken*); |
123 void processEndTag(AtomicHTMLToken*); | 123 void processEndTag(AtomicHTMLToken*); |
124 void processComment(AtomicHTMLToken*); | 124 void processComment(AtomicHTMLToken*); |
125 void processCharacter(AtomicHTMLToken*); | 125 void processCharacter(AtomicHTMLToken*); |
126 void processEndOfFile(AtomicHTMLToken*); | 126 void processEndOfFile(AtomicHTMLToken*); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 RefPtr<Element> m_scriptToProcess; // <script> tag which needs processing be
fore resuming the parser. | 232 RefPtr<Element> m_scriptToProcess; // <script> tag which needs processing be
fore resuming the parser. |
233 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. | 233 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. |
234 | 234 |
235 HTMLParserOptions m_options; | 235 HTMLParserOptions m_options; |
236 }; | 236 }; |
237 | 237 |
238 } | 238 } |
239 | 239 |
240 #endif | 240 #endif |
OLD | NEW |