Chromium Code Reviews| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 empty any queues, possibly creating more DOM nodes. |
| 86 void flush() { m_tree.flush(); } | 86 void flush() { m_tree.flush(FlushIfAtTextLimit); } |
|
eseidel
2014/08/29 08:53:09
What does this mean now that it doesn't always "fl
eustas
2014/09/01 09:46:44
Fixed comment. Pulled "mode" up to actual call-sit
| |
| 87 | 87 |
| 88 void setShouldSkipLeadingNewline(bool shouldSkip) { m_shouldSkipLeadingNewli ne = shouldSkip; } | 88 void setShouldSkipLeadingNewline(bool shouldSkip) { m_shouldSkipLeadingNewli ne = shouldSkip; } |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 class CharacterTokenBuffer; | 91 class CharacterTokenBuffer; |
| 92 // Represents HTML5 "insertion mode" | 92 // Represents HTML5 "insertion mode" |
| 93 // 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 |
| 94 enum InsertionMode { | 94 enum InsertionMode { |
| 95 InitialMode, | 95 InitialMode, |
| 96 BeforeHTMLMode, | 96 BeforeHTMLMode, |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 | 239 |
| 240 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. |
| 241 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. |
| 242 | 242 |
| 243 HTMLParserOptions m_options; | 243 HTMLParserOptions m_options; |
| 244 }; | 244 }; |
| 245 | 245 |
| 246 } | 246 } |
| 247 | 247 |
| 248 #endif | 248 #endif |
| OLD | NEW |