| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 void constructTree(AtomicHTMLToken*); | 76 void constructTree(AtomicHTMLToken*); |
| 77 | 77 |
| 78 bool hasParserBlockingScript() const { return !!m_scriptToProcess; } | 78 bool hasParserBlockingScript() const { return !!m_scriptToProcess; } |
| 79 // Must be called to take the parser-blocking script before calling the pars
er again. | 79 // Must be called to take the parser-blocking script before calling the pars
er again. |
| 80 PassRefPtrWillBeRawPtr<Element> takeScriptToProcess(TextPosition& scriptStar
tPosition); | 80 PassRefPtrWillBeRawPtr<Element> takeScriptToProcess(TextPosition& scriptStar
tPosition); |
| 81 | 81 |
| 82 // Done, close any open tags, etc. | 82 // Done, close any open tags, etc. |
| 83 void finished(); | 83 void finished(); |
| 84 | 84 |
| 85 // Synchronously flush pending text and queued tasks, possibly creating more
DOM nodes. | 85 // Synchronously empty any queues, possibly creating more DOM nodes. |
| 86 // Flushing pending text depends on |mode|. | 86 void flush() { m_tree.flush(); } |
| 87 void flush(FlushMode mode) { m_tree.flush(mode); } | |
| 88 | 87 |
| 89 void setShouldSkipLeadingNewline(bool shouldSkip) { m_shouldSkipLeadingNewli
ne = shouldSkip; } | 88 void setShouldSkipLeadingNewline(bool shouldSkip) { m_shouldSkipLeadingNewli
ne = shouldSkip; } |
| 90 | 89 |
| 91 private: | 90 private: |
| 92 class CharacterTokenBuffer; | 91 class CharacterTokenBuffer; |
| 93 // Represents HTML5 "insertion mode" | 92 // Represents HTML5 "insertion mode" |
| 94 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode | 93 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode |
| 95 enum InsertionMode { | 94 enum InsertionMode { |
| 96 InitialMode, | 95 InitialMode, |
| 97 BeforeHTMLMode, | 96 BeforeHTMLMode, |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 239 |
| 241 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p
rocessing before resuming the parser. | 240 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p
rocessing before resuming the parser. |
| 242 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. | 241 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. |
| 243 | 242 |
| 244 HTMLParserOptions m_options; | 243 HTMLParserOptions m_options; |
| 245 }; | 244 }; |
| 246 | 245 |
| 247 } | 246 } |
| 248 | 247 |
| 249 #endif | 248 #endif |
| OLD | NEW |