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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 void constructTree(AtomicHTMLToken*); | 74 void constructTree(AtomicHTMLToken*); |
75 | 75 |
76 bool hasParserBlockingScript() const { return !!m_scriptToProcess; } | 76 bool hasParserBlockingScript() const { return !!m_scriptToProcess; } |
77 // Must be called to take the parser-blocking script before calling the pars
er again. | 77 // Must be called to take the parser-blocking script before calling the pars
er again. |
78 PassRefPtr<Element> takeScriptToProcess(TextPosition& scriptStartPosition); | 78 PassRefPtr<Element> takeScriptToProcess(TextPosition& scriptStartPosition); |
79 | 79 |
80 // Done, close any open tags, etc. | 80 // Done, close any open tags, etc. |
81 void finished(); | 81 void finished(); |
82 | 82 |
| 83 // Synchronously empty any queues, possibly creating more DOM nodes. |
| 84 void flush(); |
| 85 |
83 void setShouldSkipLeadingNewline(bool shouldSkip) { m_shouldSkipLeadingNewli
ne = shouldSkip; } | 86 void setShouldSkipLeadingNewline(bool shouldSkip) { m_shouldSkipLeadingNewli
ne = shouldSkip; } |
84 | 87 |
85 private: | 88 private: |
86 class CharacterTokenBuffer; | 89 class CharacterTokenBuffer; |
87 // Represents HTML5 "insertion mode" | 90 // Represents HTML5 "insertion mode" |
88 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode | 91 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode |
89 enum InsertionMode { | 92 enum InsertionMode { |
90 InitialMode, | 93 InitialMode, |
91 BeforeHTMLMode, | 94 BeforeHTMLMode, |
92 BeforeHeadMode, | 95 BeforeHeadMode, |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 233 |
231 RefPtr<Element> m_scriptToProcess; // <script> tag which needs processing be
fore resuming the parser. | 234 RefPtr<Element> m_scriptToProcess; // <script> tag which needs processing be
fore resuming the parser. |
232 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. | 235 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. |
233 | 236 |
234 HTMLParserOptions m_options; | 237 HTMLParserOptions m_options; |
235 }; | 238 }; |
236 | 239 |
237 } | 240 } |
238 | 241 |
239 #endif | 242 #endif |
OLD | NEW |