OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 setState(startWritingAndParsing(response.Pass())); | 93 setState(startWritingAndParsing(response.Pass())); |
94 } | 94 } |
95 | 95 |
96 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(mojo::URLRespon
sePtr response) | 96 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(mojo::URLRespon
sePtr response) |
97 { | 97 { |
98 ASSERT(!m_imports.isEmpty()); | 98 ASSERT(!m_imports.isEmpty()); |
99 WeakPtr<Document> contextDocument = m_controller->master()->contextDocument(
); | 99 WeakPtr<Document> contextDocument = m_controller->master()->contextDocument(
); |
100 ASSERT(contextDocument.get()); | 100 ASSERT(contextDocument.get()); |
101 KURL url(ParsedURLString, String::fromUTF8(response->url)); | 101 KURL url(ParsedURLString, String::fromUTF8(response->url)); |
102 DocumentInit init = DocumentInit(url, 0, contextDocument, m_controller) | 102 DocumentInit init = DocumentInit(url, 0, contextDocument, m_controller) |
103 .withRegistrationContext(m_controller->master()->registrationContext()); | 103 .withElementRegistry(m_controller->master()->elementRegistry()); |
104 m_document = Document::create(init); | 104 m_document = Document::create(init); |
105 m_module = Module::create(contextDocument.get(), nullptr, m_document.get(),
url.string()); | 105 m_module = Module::create(contextDocument.get(), nullptr, m_document.get(),
url.string()); |
106 m_document->startParsing()->parse(response->body.Pass(), base::Bind(base::Do
Nothing)); | 106 m_document->startParsing()->parse(response->body.Pass(), base::Bind(base::Do
Nothing)); |
107 return StateLoading; | 107 return StateLoading; |
108 } | 108 } |
109 | 109 |
110 HTMLImportLoader::State HTMLImportLoader::finishWriting() | 110 HTMLImportLoader::State HTMLImportLoader::finishWriting() |
111 { | 111 { |
112 return StateWritten; | 112 return StateWritten; |
113 } | 113 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 { | 183 { |
184 return firstImport()->state().shouldBlockScriptExecution(); | 184 return firstImport()->state().shouldBlockScriptExecution(); |
185 } | 185 } |
186 | 186 |
187 PassRefPtr<CustomElementSyncMicrotaskQueue> HTMLImportLoader::microtaskQueue() c
onst | 187 PassRefPtr<CustomElementSyncMicrotaskQueue> HTMLImportLoader::microtaskQueue() c
onst |
188 { | 188 { |
189 return m_microtaskQueue; | 189 return m_microtaskQueue; |
190 } | 190 } |
191 | 191 |
192 } // namespace blink | 192 } // namespace blink |
OLD | NEW |