Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: Source/core/html/parser/HTMLDocumentParser.cpp

Issue 15796009: Parse SVG as HTML (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile issue (the tree moved). Ready for landing Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/parser/HTMLDocumentParser.h ('k') | Source/core/html/parser/HTMLTreeBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLDocumentParser.h ('k') | Source/core/html/parser/HTMLTreeBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698