| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 m_tokenizer->setState(tokenizerStateForContextElement(contextElement, report
Errors, m_options)); | 106 m_tokenizer->setState(tokenizerStateForContextElement(contextElement, report
Errors, m_options)); |
| 107 m_xssAuditor.initForFragment(); | 107 m_xssAuditor.initForFragment(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 HTMLDocumentParser::HTMLDocumentParser(Document& document, ParserContentPolicy c
ontentPolicy, ParserSynchronizationPolicy syncPolicy) | 110 HTMLDocumentParser::HTMLDocumentParser(Document& document, ParserContentPolicy c
ontentPolicy, ParserSynchronizationPolicy syncPolicy) |
| 111 : ScriptableDocumentParser(document, contentPolicy) | 111 : ScriptableDocumentParser(document, contentPolicy) |
| 112 , m_options(&document) | 112 , m_options(&document) |
| 113 , m_reentryPermit(HTMLParserReentryPermit::create()) | 113 , m_reentryPermit(HTMLParserReentryPermit::create()) |
| 114 , m_token(syncPolicy == ForceSynchronousParsing ? wrapUnique(new HTMLToken)
: nullptr) | 114 , m_token(syncPolicy == ForceSynchronousParsing ? wrapUnique(new HTMLToken)
: nullptr) |
| 115 , m_tokenizer(syncPolicy == ForceSynchronousParsing ? HTMLTokenizer::create(
m_options) : nullptr) | 115 , m_tokenizer(syncPolicy == ForceSynchronousParsing ? HTMLTokenizer::create(
m_options) : nullptr) |
| 116 , m_loadingTaskRunner(TaskRunnerHelper::getLoadingTaskRunner(&document)->clo
ne()) | 116 , m_loadingTaskRunner(TaskRunnerHelper::get(TaskType::Networking, &document)
->clone()) |
| 117 , m_parserScheduler(syncPolicy == AllowAsynchronousParsing ? HTMLParserSched
uler::create(this, m_loadingTaskRunner.get()) : nullptr) | 117 , m_parserScheduler(syncPolicy == AllowAsynchronousParsing ? HTMLParserSched
uler::create(this, m_loadingTaskRunner.get()) : nullptr) |
| 118 , m_xssAuditorDelegate(&document) | 118 , m_xssAuditorDelegate(&document) |
| 119 , m_weakFactory(this) | 119 , m_weakFactory(this) |
| 120 , m_preloader(HTMLResourcePreloader::create(document)) | 120 , m_preloader(HTMLResourcePreloader::create(document)) |
| 121 , m_tokenizedChunkQueue(TokenizedChunkQueue::create()) | 121 , m_tokenizedChunkQueue(TokenizedChunkQueue::create()) |
| 122 , m_evaluator(DocumentWriteEvaluator::create(document)) | 122 , m_evaluator(DocumentWriteEvaluator::create(document)) |
| 123 , m_shouldUseThreading(syncPolicy == AllowAsynchronousParsing) | 123 , m_shouldUseThreading(syncPolicy == AllowAsynchronousParsing) |
| 124 , m_endWasDelayed(false) | 124 , m_endWasDelayed(false) |
| 125 , m_haveBackgroundParser(false) | 125 , m_haveBackgroundParser(false) |
| 126 , m_tasksWereSuspended(false) | 126 , m_tasksWereSuspended(false) |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); | 1172 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); |
| 1173 return; | 1173 return; |
| 1174 case Asynchronous: | 1174 case Asynchronous: |
| 1175 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std::
forward<Ps>(parameters)...)); | 1175 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std::
forward<Ps>(parameters)...)); |
| 1176 return; | 1176 return; |
| 1177 } | 1177 } |
| 1178 NOTREACHED(); | 1178 NOTREACHED(); |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 } // namespace blink | 1181 } // namespace blink |
| OLD | NEW |