| 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "sky/engine/config.h" | 26 #include "sky/engine/config.h" |
| 27 #include "sky/engine/core/html/parser/HTMLDocumentParser.h" | 27 #include "sky/engine/core/html/parser/HTMLDocumentParser.h" |
| 28 | 28 |
| 29 #include "base/bind.h" | 29 #include "base/bind.h" |
| 30 #include "gen/sky/core/HTMLNames.h" | 30 #include "gen/sky/core/HTMLNames.h" |
| 31 #include "sky/engine/core/css/MediaValuesCached.h" | 31 #include "sky/engine/core/css/MediaValuesCached.h" |
| 32 #include "sky/engine/core/dom/Element.h" | 32 #include "sky/engine/core/dom/Element.h" |
| 33 #include "sky/engine/core/frame/LocalFrame.h" | 33 #include "sky/engine/core/frame/LocalFrame.h" |
| 34 #include "sky/engine/core/html/HTMLDocument.h" | |
| 35 #include "sky/engine/core/html/HTMLScriptElement.h" | 34 #include "sky/engine/core/html/HTMLScriptElement.h" |
| 36 #include "sky/engine/core/html/parser/AtomicHTMLToken.h" | 35 #include "sky/engine/core/html/parser/AtomicHTMLToken.h" |
| 37 #include "sky/engine/core/html/parser/BackgroundHTMLParser.h" | 36 #include "sky/engine/core/html/parser/BackgroundHTMLParser.h" |
| 38 #include "sky/engine/core/html/parser/HTMLParserScheduler.h" | 37 #include "sky/engine/core/html/parser/HTMLParserScheduler.h" |
| 39 #include "sky/engine/core/html/parser/HTMLParserThread.h" | 38 #include "sky/engine/core/html/parser/HTMLParserThread.h" |
| 40 #include "sky/engine/core/html/parser/HTMLTreeBuilder.h" | 39 #include "sky/engine/core/html/parser/HTMLTreeBuilder.h" |
| 41 #include "sky/engine/core/inspector/InspectorTraceEvents.h" | 40 #include "sky/engine/core/inspector/InspectorTraceEvents.h" |
| 42 #include "sky/engine/platform/SharedBuffer.h" | 41 #include "sky/engine/platform/SharedBuffer.h" |
| 43 #include "sky/engine/platform/TraceEvent.h" | 42 #include "sky/engine/platform/TraceEvent.h" |
| 44 | 43 |
| 45 namespace blink { | 44 namespace blink { |
| 46 | 45 |
| 47 HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document, bool reportErrors
) | 46 HTMLDocumentParser::HTMLDocumentParser(Document& document, bool reportErrors) |
| 48 : DocumentParser(&document) | 47 : DocumentParser(&document) |
| 49 , m_treeBuilder(HTMLTreeBuilder::create(this, &document, reportErrors)) | 48 , m_treeBuilder(HTMLTreeBuilder::create(this, &document, reportErrors)) |
| 50 , m_parserScheduler(HTMLParserScheduler::create(this)) | 49 , m_parserScheduler(HTMLParserScheduler::create(this)) |
| 51 , m_weakFactory(this) | 50 , m_weakFactory(this) |
| 52 , m_isFragment(false) | 51 , m_isFragment(false) |
| 53 , m_endWasDelayed(false) | 52 , m_endWasDelayed(false) |
| 54 , m_haveBackgroundParser(false) | 53 , m_haveBackgroundParser(false) |
| 55 , m_pumpSessionNestingLevel(0) | 54 , m_pumpSessionNestingLevel(0) |
| 56 { | 55 { |
| 57 } | 56 } |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 m_scriptRunner.executePendingScripts(); | 387 m_scriptRunner.executePendingScripts(); |
| 389 ASSERT(!isExecutingScript()); | 388 ASSERT(!isExecutingScript()); |
| 390 ASSERT(!isWaitingForScripts()); | 389 ASSERT(!isWaitingForScripts()); |
| 391 if (m_speculations.isEmpty()) | 390 if (m_speculations.isEmpty()) |
| 392 return; | 391 return; |
| 393 ASSERT(m_haveBackgroundParser); | 392 ASSERT(m_haveBackgroundParser); |
| 394 pumpPendingSpeculations(); | 393 pumpPendingSpeculations(); |
| 395 } | 394 } |
| 396 | 395 |
| 397 } | 396 } |
| OLD | NEW |