| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "core/html/parser/HTMLDocumentParser.h" | 27 #include "core/html/parser/HTMLDocumentParser.h" |
| 28 | 28 |
| 29 #include "HTMLNames.h" | 29 #include "HTMLNames.h" |
| 30 #include "core/dom/DocumentFragment.h" | 30 #include "core/dom/DocumentFragment.h" |
| 31 #include "core/dom/Element.h" | 31 #include "core/dom/Element.h" |
| 32 #include "core/html/HTMLDocument.h" | 32 #include "core/html/HTMLDocument.h" |
| 33 #include "core/html/parser/AtomicHTMLToken.h" | 33 #include "core/html/parser/AtomicHTMLToken.h" |
| 34 #include "core/html/parser/BackgroundHTMLParser.h" | 34 #include "core/html/parser/BackgroundHTMLParser.h" |
| 35 #include "core/html/parser/HTMLIdentifier.h" | |
| 36 #include "core/html/parser/HTMLParserScheduler.h" | 35 #include "core/html/parser/HTMLParserScheduler.h" |
| 37 #include "core/html/parser/HTMLParserThread.h" | 36 #include "core/html/parser/HTMLParserThread.h" |
| 38 #include "core/html/parser/HTMLScriptRunner.h" | 37 #include "core/html/parser/HTMLScriptRunner.h" |
| 39 #include "core/html/parser/HTMLTreeBuilder.h" | 38 #include "core/html/parser/HTMLTreeBuilder.h" |
| 40 #include "core/inspector/InspectorInstrumentation.h" | 39 #include "core/inspector/InspectorInstrumentation.h" |
| 41 #include "core/frame/Frame.h" | 40 #include "core/frame/Frame.h" |
| 42 #include "platform/TraceEvent.h" | 41 #include "platform/TraceEvent.h" |
| 43 #include "wtf/Functional.h" | 42 #include "wtf/Functional.h" |
| 44 | 43 |
| 45 namespace WebCore { | 44 namespace WebCore { |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 | 650 |
| 652 endIfDelayed(); | 651 endIfDelayed(); |
| 653 } | 652 } |
| 654 | 653 |
| 655 void HTMLDocumentParser::startBackgroundParser() | 654 void HTMLDocumentParser::startBackgroundParser() |
| 656 { | 655 { |
| 657 ASSERT(shouldUseThreading()); | 656 ASSERT(shouldUseThreading()); |
| 658 ASSERT(!m_haveBackgroundParser); | 657 ASSERT(!m_haveBackgroundParser); |
| 659 m_haveBackgroundParser = true; | 658 m_haveBackgroundParser = true; |
| 660 | 659 |
| 661 HTMLIdentifier::init(); | |
| 662 | |
| 663 RefPtr<WeakReference<BackgroundHTMLParser> > reference = WeakReference<Backg
roundHTMLParser>::createUnbound(); | 660 RefPtr<WeakReference<BackgroundHTMLParser> > reference = WeakReference<Backg
roundHTMLParser>::createUnbound(); |
| 664 m_backgroundParser = WeakPtr<BackgroundHTMLParser>(reference); | 661 m_backgroundParser = WeakPtr<BackgroundHTMLParser>(reference); |
| 665 | 662 |
| 666 OwnPtr<BackgroundHTMLParser::Configuration> config = adoptPtr(new Background
HTMLParser::Configuration); | 663 OwnPtr<BackgroundHTMLParser::Configuration> config = adoptPtr(new Background
HTMLParser::Configuration); |
| 667 config->options = m_options; | 664 config->options = m_options; |
| 668 config->parser = m_weakFactory.createWeakPtr(); | 665 config->parser = m_weakFactory.createWeakPtr(); |
| 669 config->xssAuditor = adoptPtr(new XSSAuditor); | 666 config->xssAuditor = adoptPtr(new XSSAuditor); |
| 670 config->xssAuditor->init(document(), &m_xssAuditorDelegate); | 667 config->xssAuditor->init(document(), &m_xssAuditorDelegate); |
| 671 config->preloadScanner = adoptPtr(new TokenPreloadScanner(document()->url().
copy(), document()->devicePixelRatio())); | 668 config->preloadScanner = adoptPtr(new TokenPreloadScanner(document()->url().
copy(), document()->devicePixelRatio())); |
| 672 | 669 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 m_parserScheduler->suspend(); | 959 m_parserScheduler->suspend(); |
| 963 } | 960 } |
| 964 | 961 |
| 965 void HTMLDocumentParser::resumeScheduledTasks() | 962 void HTMLDocumentParser::resumeScheduledTasks() |
| 966 { | 963 { |
| 967 if (m_parserScheduler) | 964 if (m_parserScheduler) |
| 968 m_parserScheduler->resume(); | 965 m_parserScheduler->resume(); |
| 969 } | 966 } |
| 970 | 967 |
| 971 } | 968 } |
| OLD | NEW |