OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 12 matching lines...) Expand all Loading... | |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #include "core/html/parser/HTMLConstructionSite.h" | 27 #include "core/html/parser/HTMLConstructionSite.h" |
28 | 28 |
29 #include "core/HTMLElementFactory.h" | 29 #include "core/HTMLElementFactory.h" |
30 #include "core/HTMLNames.h" | 30 #include "core/HTMLNames.h" |
31 #include "core/dom/Comment.h" | 31 #include "core/dom/Comment.h" |
32 #include "core/dom/DocumentFragment.h" | 32 #include "core/dom/DocumentFragment.h" |
33 #include "core/dom/DocumentParser.h" | |
33 #include "core/dom/DocumentType.h" | 34 #include "core/dom/DocumentType.h" |
34 #include "core/dom/Element.h" | 35 #include "core/dom/Element.h" |
35 #include "core/dom/ScriptLoader.h" | 36 #include "core/dom/ScriptLoader.h" |
36 #include "core/dom/TemplateContentDocumentFragment.h" | 37 #include "core/dom/TemplateContentDocumentFragment.h" |
37 #include "core/dom/Text.h" | 38 #include "core/dom/Text.h" |
38 #include "core/frame/LocalFrame.h" | 39 #include "core/frame/LocalFrame.h" |
39 #include "core/html/HTMLFormElement.h" | 40 #include "core/html/HTMLFormElement.h" |
40 #include "core/html/HTMLHtmlElement.h" | 41 #include "core/html/HTMLHtmlElement.h" |
41 #include "core/html/HTMLPlugInElement.h" | 42 #include "core/html/HTMLPlugInElement.h" |
42 #include "core/html/HTMLScriptElement.h" | 43 #include "core/html/HTMLScriptElement.h" |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
375 } | 376 } |
376 | 377 |
377 HTMLFormElement* HTMLConstructionSite::takeForm() | 378 HTMLFormElement* HTMLConstructionSite::takeForm() |
378 { | 379 { |
379 return m_form.release(); | 380 return m_form.release(); |
380 } | 381 } |
381 | 382 |
382 void HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded() | 383 void HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded() |
383 { | 384 { |
384 ASSERT(m_document); | 385 ASSERT(m_document); |
386 m_document->parser()->documentElementAvailable(); | |
kouhei (in TOK)
2016/06/08 05:09:11
I'm not a fan of cyclic-dependency introduced here
Charlie Harrison
2016/06/08 22:25:50
Yeah sure. I agree this is a non ideal architectur
| |
385 if (m_document->frame() && !m_isParsingFragment) { | 387 if (m_document->frame() && !m_isParsingFragment) { |
386 m_document->frame()->loader().dispatchDocumentElementAvailable(); | 388 m_document->frame()->loader().dispatchDocumentElementAvailable(); |
387 m_document->frame()->loader().runScriptsAtDocumentElementAvailable(); | 389 m_document->frame()->loader().runScriptsAtDocumentElementAvailable(); |
388 // runScriptsAtDocumentElementAvailable might have invalidated m_documen t. | 390 // runScriptsAtDocumentElementAvailable might have invalidated m_documen t. |
389 } | 391 } |
390 } | 392 } |
391 | 393 |
392 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* tok en) | 394 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* tok en) |
393 { | 395 { |
394 ASSERT(m_document); | 396 ASSERT(m_document); |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
886 queueTask(task); | 888 queueTask(task); |
887 } | 889 } |
888 | 890 |
889 DEFINE_TRACE(HTMLConstructionSite::PendingText) | 891 DEFINE_TRACE(HTMLConstructionSite::PendingText) |
890 { | 892 { |
891 visitor->trace(parent); | 893 visitor->trace(parent); |
892 visitor->trace(nextChild); | 894 visitor->trace(nextChild); |
893 } | 895 } |
894 | 896 |
895 } // namespace blink | 897 } // namespace blink |
OLD | NEW |