| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 HTMLDocumentParser(Document&, bool reportErrors); | 89 HTMLDocumentParser(Document&, bool reportErrors); |
| 90 | 90 |
| 91 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } | 91 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } |
| 92 | 92 |
| 93 bool hasInsertionPoint(); | 93 bool hasInsertionPoint(); |
| 94 | 94 |
| 95 void stopBackgroundParser(); | 95 void stopBackgroundParser(); |
| 96 void processParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); | 96 void processParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); |
| 97 void pumpPendingSpeculations(); | 97 void pumpPendingChunks(); |
| 98 | 98 |
| 99 Document* contextForParsingSession(); | 99 Document* contextForParsingSession(); |
| 100 | 100 |
| 101 void constructTreeFromHTMLToken(HTMLToken&); | 101 void constructTreeFromHTMLToken(HTMLToken&); |
| 102 void constructTreeFromCompactHTMLToken(const CompactHTMLToken&); | 102 void constructTreeFromCompactHTMLToken(const CompactHTMLToken&); |
| 103 | 103 |
| 104 void runScriptsForPausedTreeBuilder(); | 104 void runScriptsForPausedTreeBuilder(); |
| 105 | 105 |
| 106 void attemptToEnd(); | 106 void attemptToEnd(); |
| 107 void endIfDelayed(); | 107 void endIfDelayed(); |
| 108 void end(); | 108 void end(); |
| 109 | 109 |
| 110 bool isParsingFragment() const; | 110 bool isParsingFragment() const; |
| 111 bool isScheduledForResume() const; | 111 bool isScheduledForResume() const; |
| 112 bool inPumpSession() const { return m_pumpSessionNestingLevel > 0; } | 112 bool inPumpSession() const { return m_pumpSessionNestingLevel > 0; } |
| 113 bool shouldDelayEnd() const { return inPumpSession() || isWaitingForScripts(
) || isScheduledForResume() || isExecutingScript(); } | 113 bool shouldDelayEnd() const { return inPumpSession() || isWaitingForScripts(
) || isScheduledForResume() || isExecutingScript(); } |
| 114 | 114 |
| 115 OwnPtr<HTMLTreeBuilder> m_treeBuilder; | 115 OwnPtr<HTMLTreeBuilder> m_treeBuilder; |
| 116 OwnPtr<HTMLParserScheduler> m_parserScheduler; | 116 OwnPtr<HTMLParserScheduler> m_parserScheduler; |
| 117 TextPosition m_textPosition; | 117 TextPosition m_textPosition; |
| 118 | 118 |
| 119 HTMLScriptRunner m_scriptRunner; | 119 HTMLScriptRunner m_scriptRunner; |
| 120 | 120 |
| 121 OwnPtr<ParsedChunk> m_lastChunkBeforeScript; | 121 OwnPtr<ParsedChunk> m_lastChunkBeforeScript; |
| 122 Deque<OwnPtr<ParsedChunk> > m_speculations; | 122 Deque<OwnPtr<ParsedChunk> > m_pendingChunks; |
| 123 base::WeakPtrFactory<HTMLDocumentParser> m_weakFactory; | 123 base::WeakPtrFactory<HTMLDocumentParser> m_weakFactory; |
| 124 base::WeakPtr<BackgroundHTMLParser> m_backgroundParser; | 124 base::WeakPtr<BackgroundHTMLParser> m_backgroundParser; |
| 125 | 125 |
| 126 base::Closure m_completionCallback; | 126 base::Closure m_completionCallback; |
| 127 | 127 |
| 128 bool m_isFragment; | 128 bool m_isFragment; |
| 129 bool m_endWasDelayed; | 129 bool m_endWasDelayed; |
| 130 bool m_haveBackgroundParser; | 130 bool m_haveBackgroundParser; |
| 131 unsigned m_pumpSessionNestingLevel; | 131 unsigned m_pumpSessionNestingLevel; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } | 134 } |
| 135 | 135 |
| 136 #endif // SKY_ENGINE_CORE_HTML_PARSER_HTMLDOCUMENTPARSER_H_ | 136 #endif // SKY_ENGINE_CORE_HTML_PARSER_HTMLDOCUMENTPARSER_H_ |
| OLD | NEW |