| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 return 0; | 99 return 0; |
| 100 } | 100 } |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 WeakPtr<BackgroundHTMLParser> m_backgroundParser; | 103 WeakPtr<BackgroundHTMLParser> m_backgroundParser; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document, bool reportErrors
) | 106 HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document, bool reportErrors
) |
| 107 : ScriptableDocumentParser(document) | 107 : ScriptableDocumentParser(document) |
| 108 , m_options(&document) | 108 , m_options(&document) |
| 109 , m_token(m_options.useThreading ? nullptr : adoptPtr(new HTMLToken)) | 109 , m_token(nullptr) |
| 110 , m_tokenizer(m_options.useThreading ? nullptr : HTMLTokenizer::create(m_opt
ions)) | 110 , m_tokenizer(nullptr) |
| 111 , m_scriptRunner(HTMLScriptRunner::create(&document, this)) | 111 , m_scriptRunner(HTMLScriptRunner::create(&document, this)) |
| 112 , m_treeBuilder(HTMLTreeBuilder::create(this, &document, parserContentPolicy
(), reportErrors, m_options)) | 112 , m_treeBuilder(HTMLTreeBuilder::create(this, &document, parserContentPolicy
(), reportErrors, m_options)) |
| 113 , m_parserScheduler(HTMLParserScheduler::create(this)) | 113 , m_parserScheduler(HTMLParserScheduler::create(this)) |
| 114 , m_xssAuditorDelegate(&document) | 114 , m_xssAuditorDelegate(&document) |
| 115 , m_weakFactory(this) | 115 , m_weakFactory(this) |
| 116 , m_preloader(HTMLResourcePreloader::create(document)) | 116 , m_preloader(HTMLResourcePreloader::create(document)) |
| 117 , m_isPinnedToMainThread(false) | 117 , m_isPinnedToMainThread(false) |
| 118 , m_endWasDelayed(false) | 118 , m_endWasDelayed(false) |
| 119 , m_haveBackgroundParser(false) | 119 , m_haveBackgroundParser(false) |
| 120 , m_pumpSessionNestingLevel(0) | 120 , m_pumpSessionNestingLevel(0) |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) | 1067 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) |
| 1068 { | 1068 { |
| 1069 ASSERT(decoder); | 1069 ASSERT(decoder); |
| 1070 DecodedDataDocumentParser::setDecoder(decoder); | 1070 DecodedDataDocumentParser::setDecoder(decoder); |
| 1071 | 1071 |
| 1072 if (m_haveBackgroundParser) | 1072 if (m_haveBackgroundParser) |
| 1073 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco
der, m_backgroundParser, takeDecoder())); | 1073 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco
der, m_backgroundParser, takeDecoder())); |
| 1074 } | 1074 } |
| 1075 | 1075 |
| 1076 } | 1076 } |
| OLD | NEW |