| 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 empty any queues, possibly creating more DOM nodes. | 85 // Synchronously flush pending text and queued tasks, possibly creating more
DOM nodes. |
| 86 void flush() { m_tree.flush(); } | 86 // Flushing pending text depends on |mode|. |
| 87 void flush(FlushMode mode) { m_tree.flush(mode); } |
| 87 | 88 |
| 88 void setShouldSkipLeadingNewline(bool shouldSkip) { m_shouldSkipLeadingNewli
ne = shouldSkip; } | 89 void setShouldSkipLeadingNewline(bool shouldSkip) { m_shouldSkipLeadingNewli
ne = shouldSkip; } |
| 89 | 90 |
| 90 private: | 91 private: |
| 91 class CharacterTokenBuffer; | 92 class CharacterTokenBuffer; |
| 92 // Represents HTML5 "insertion mode" | 93 // Represents HTML5 "insertion mode" |
| 93 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode | 94 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode |
| 94 enum InsertionMode { | 95 enum InsertionMode { |
| 95 InitialMode, | 96 InitialMode, |
| 96 BeforeHTMLMode, | 97 BeforeHTMLMode, |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 240 |
| 240 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p
rocessing before resuming the parser. | 241 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p
rocessing before resuming the parser. |
| 241 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. | 242 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. |
| 242 | 243 |
| 243 HTMLParserOptions m_options; | 244 HTMLParserOptions m_options; |
| 244 }; | 245 }; |
| 245 | 246 |
| 246 } | 247 } |
| 247 | 248 |
| 248 #endif | 249 #endif |
| OLD | NEW |