| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 return reportErrors ? HTMLTokenizer::ScriptDataState : HTMLTokenizer::PL
AINTEXTState; | 85 return reportErrors ? HTMLTokenizer::ScriptDataState : HTMLTokenizer::PL
AINTEXTState; |
| 86 if (contextTag.matches(plaintextTag)) | 86 if (contextTag.matches(plaintextTag)) |
| 87 return HTMLTokenizer::PLAINTEXTState; | 87 return HTMLTokenizer::PLAINTEXTState; |
| 88 return HTMLTokenizer::DataState; | 88 return HTMLTokenizer::DataState; |
| 89 } | 89 } |
| 90 | 90 |
| 91 HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document, ParserSynchroniza
tionPolicy syncPolicy) | 91 HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document, ParserSynchroniza
tionPolicy syncPolicy) |
| 92 : HTMLDocumentParser(document, AllowScriptingContent, syncPolicy) | 92 : HTMLDocumentParser(document, AllowScriptingContent, syncPolicy) |
| 93 { | 93 { |
| 94 m_scriptRunner = HTMLScriptRunner::create(&document, this); | 94 m_scriptRunner = HTMLScriptRunner::create(&document, this); |
| 95 m_treeBuilder = HTMLTreeBuilder::create(this, &document, AllowScriptingConte
nt, m_options); | 95 m_treeBuilder = HTMLTreeBuilder::create(this, document, AllowScriptingConten
t, m_options); |
| 96 } | 96 } |
| 97 | 97 |
| 98 HTMLDocumentParser::HTMLDocumentParser(DocumentFragment* fragment, Element* cont
extElement, ParserContentPolicy parserContentPolicy) | 98 HTMLDocumentParser::HTMLDocumentParser(DocumentFragment* fragment, Element* cont
extElement, ParserContentPolicy parserContentPolicy) |
| 99 : HTMLDocumentParser(fragment->document(), parserContentPolicy, ForceSynchro
nousParsing) | 99 : HTMLDocumentParser(fragment->document(), parserContentPolicy, ForceSynchro
nousParsing) |
| 100 { | 100 { |
| 101 // No m_scriptRunner in fragment parser. | 101 // No m_scriptRunner in fragment parser. |
| 102 m_treeBuilder = HTMLTreeBuilder::create(this, fragment, contextElement, pars
erContentPolicy, m_options); | 102 m_treeBuilder = HTMLTreeBuilder::create(this, fragment, contextElement, pars
erContentPolicy, m_options); |
| 103 | 103 |
| 104 bool reportErrors = false; // For now document fragment parsing never report
s errors. | 104 bool reportErrors = false; // For now document fragment parsing never report
s errors. |
| 105 m_tokenizer->setState(tokenizerStateForContextElement(contextElement, report
Errors, m_options)); | 105 m_tokenizer->setState(tokenizerStateForContextElement(contextElement, report
Errors, m_options)); |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 (*closure)(); | 1139 (*closure)(); |
| 1140 return; | 1140 return; |
| 1141 case Asynchronous: | 1141 case Asynchronous: |
| 1142 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, std::move(closure)); | 1142 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, std::move(closure)); |
| 1143 return; | 1143 return; |
| 1144 } | 1144 } |
| 1145 NOTREACHED(); | 1145 NOTREACHED(); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 } // namespace blink | 1148 } // namespace blink |
| OLD | NEW |