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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 || (contextTag.matches(noscriptTag) && options.scriptEnabled) | 66 || (contextTag.matches(noscriptTag) && options.scriptEnabled) |
67 || contextTag.matches(noframesTag)) | 67 || contextTag.matches(noframesTag)) |
68 return reportErrors ? HTMLTokenizer::RAWTEXTState : HTMLTokenizer::PLAIN
TEXTState; | 68 return reportErrors ? HTMLTokenizer::RAWTEXTState : HTMLTokenizer::PLAIN
TEXTState; |
69 if (contextTag.matches(scriptTag)) | 69 if (contextTag.matches(scriptTag)) |
70 return reportErrors ? HTMLTokenizer::ScriptDataState : HTMLTokenizer::PL
AINTEXTState; | 70 return reportErrors ? HTMLTokenizer::ScriptDataState : HTMLTokenizer::PL
AINTEXTState; |
71 if (contextTag.matches(plaintextTag)) | 71 if (contextTag.matches(plaintextTag)) |
72 return HTMLTokenizer::PLAINTEXTState; | 72 return HTMLTokenizer::PLAINTEXTState; |
73 return HTMLTokenizer::DataState; | 73 return HTMLTokenizer::DataState; |
74 } | 74 } |
75 | 75 |
76 HTMLDocumentParser::HTMLDocumentParser(HTMLDocument* document, bool reportErrors
) | 76 HTMLDocumentParser::HTMLDocumentParser(Document* document, bool reportErrors) |
77 : ScriptableDocumentParser(document) | 77 : ScriptableDocumentParser(document) |
78 , m_options(document) | 78 , m_options(document) |
79 , m_token(m_options.useThreading ? nullptr : adoptPtr(new HTMLToken)) | 79 , m_token(m_options.useThreading ? nullptr : adoptPtr(new HTMLToken)) |
80 , m_tokenizer(m_options.useThreading ? nullptr : HTMLTokenizer::create(m_opt
ions)) | 80 , m_tokenizer(m_options.useThreading ? nullptr : HTMLTokenizer::create(m_opt
ions)) |
81 , m_scriptRunner(HTMLScriptRunner::create(document, this)) | 81 , m_scriptRunner(HTMLScriptRunner::create(document, this)) |
82 , m_treeBuilder(HTMLTreeBuilder::create(this, document, parserContentPolicy(
), reportErrors, m_options)) | 82 , m_treeBuilder(HTMLTreeBuilder::create(this, document, parserContentPolicy(
), reportErrors, m_options)) |
83 , m_parserScheduler(HTMLParserScheduler::create(this)) | 83 , m_parserScheduler(HTMLParserScheduler::create(this)) |
84 , m_xssAuditorDelegate(document) | 84 , m_xssAuditorDelegate(document) |
85 , m_weakFactory(this) | 85 , m_weakFactory(this) |
86 , m_preloader(adoptPtr(new HTMLResourcePreloader(document))) | 86 , m_preloader(adoptPtr(new HTMLResourcePreloader(document))) |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 m_parserScheduler->suspend(); | 932 m_parserScheduler->suspend(); |
933 } | 933 } |
934 | 934 |
935 void HTMLDocumentParser::resumeScheduledTasks() | 935 void HTMLDocumentParser::resumeScheduledTasks() |
936 { | 936 { |
937 if (m_parserScheduler) | 937 if (m_parserScheduler) |
938 m_parserScheduler->resume(); | 938 m_parserScheduler->resume(); |
939 } | 939 } |
940 | 940 |
941 } | 941 } |
OLD | NEW |