| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void resumeParsingAfterYield(); | 71 void resumeParsingAfterYield(); |
| 72 | 72 |
| 73 TextPosition textPosition() const; | 73 TextPosition textPosition() const; |
| 74 OrdinalNumber lineNumber() const; | 74 OrdinalNumber lineNumber() const; |
| 75 | 75 |
| 76 struct ParsedChunk { | 76 struct ParsedChunk { |
| 77 OwnPtr<CompactHTMLTokenStream> tokens; | 77 OwnPtr<CompactHTMLTokenStream> tokens; |
| 78 }; | 78 }; |
| 79 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); | 79 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); |
| 80 | 80 |
| 81 bool isWaitingForScripts() const; | 81 // From DocumentParser: |
| 82 bool isExecutingScript() const; | 82 void detach() override final; |
| 83 void executeScriptsWaitingForResources(); | 83 void prepareToStopParsing() override final; |
| 84 void stopParsing() override final; |
| 85 bool isWaitingForScripts() const override final; |
| 86 bool isExecutingScript() const override final; |
| 87 void executeScriptsWaitingForResources() override final; |
| 84 | 88 |
| 85 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi
on()); } | 89 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi
on()); } |
| 86 | 90 |
| 87 private: | 91 private: |
| 88 HTMLDocumentParser(HTMLDocument&, bool reportErrors); | 92 HTMLDocumentParser(HTMLDocument&, bool reportErrors); |
| 89 | 93 |
| 90 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } | 94 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } |
| 91 | 95 |
| 92 virtual HTMLDocumentParser* asHTMLDocumentParser() override final { return t
his; } | |
| 93 | |
| 94 // DocumentParser | |
| 95 virtual void detach() override final; | |
| 96 virtual bool processingData() const override final; | |
| 97 virtual void prepareToStopParsing() override final; | |
| 98 virtual void stopParsing() override final; | |
| 99 | |
| 100 bool hasInsertionPoint(); | 96 bool hasInsertionPoint(); |
| 101 | 97 |
| 102 void startBackgroundParser(); | 98 void startBackgroundParser(); |
| 103 void stopBackgroundParser(); | 99 void stopBackgroundParser(); |
| 104 void validateSpeculations(PassOwnPtr<ParsedChunk> lastChunk); | 100 void validateSpeculations(PassOwnPtr<ParsedChunk> lastChunk); |
| 105 void processParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); | 101 void processParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); |
| 106 void pumpPendingSpeculations(); | 102 void pumpPendingSpeculations(); |
| 107 | 103 |
| 108 Document* contextForParsingSession(); | 104 Document* contextForParsingSession(); |
| 109 | 105 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 135 | 131 |
| 136 bool m_isFragment; | 132 bool m_isFragment; |
| 137 bool m_endWasDelayed; | 133 bool m_endWasDelayed; |
| 138 bool m_haveBackgroundParser; | 134 bool m_haveBackgroundParser; |
| 139 unsigned m_pumpSessionNestingLevel; | 135 unsigned m_pumpSessionNestingLevel; |
| 140 }; | 136 }; |
| 141 | 137 |
| 142 } | 138 } |
| 143 | 139 |
| 144 #endif | 140 #endif |
| OLD | NEW |