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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 HTMLConstructionSite::HTMLConstructionSite(Document* document, ParserContentPoli
cy parserContentPolicy) | 214 HTMLConstructionSite::HTMLConstructionSite(Document* document, ParserContentPoli
cy parserContentPolicy) |
215 : m_document(document) | 215 : m_document(document) |
216 , m_attachmentRoot(document) | 216 , m_attachmentRoot(document) |
217 , m_parserContentPolicy(parserContentPolicy) | 217 , m_parserContentPolicy(parserContentPolicy) |
218 , m_isParsingFragment(false) | 218 , m_isParsingFragment(false) |
219 , m_redirectAttachToFosterParent(false) | 219 , m_redirectAttachToFosterParent(false) |
220 , m_inQuirksMode(document->inQuirksMode()) | 220 , m_inQuirksMode(document->inQuirksMode()) |
221 { | 221 { |
222 ASSERT(m_document->isHTMLDocument() || m_document->isXHTMLDocument()); | 222 ASSERT(m_document->isHTMLDocument() || m_document->isSVGDocument() || m_docu
ment->isXHTMLDocument()); |
223 } | 223 } |
224 | 224 |
225 HTMLConstructionSite::HTMLConstructionSite(DocumentFragment* fragment, ParserCon
tentPolicy parserContentPolicy) | 225 HTMLConstructionSite::HTMLConstructionSite(DocumentFragment* fragment, ParserCon
tentPolicy parserContentPolicy) |
226 : m_document(fragment->document()) | 226 : m_document(fragment->document()) |
227 , m_attachmentRoot(fragment) | 227 , m_attachmentRoot(fragment) |
228 , m_parserContentPolicy(parserContentPolicy) | 228 , m_parserContentPolicy(parserContentPolicy) |
229 , m_isParsingFragment(true) | 229 , m_isParsingFragment(true) |
230 , m_redirectAttachToFosterParent(false) | 230 , m_redirectAttachToFosterParent(false) |
231 , m_inQuirksMode(fragment->document()->inQuirksMode()) | 231 , m_inQuirksMode(fragment->document()->inQuirksMode()) |
232 { | 232 { |
233 ASSERT(m_document->isHTMLDocument() || m_document->isXHTMLDocument()); | 233 ASSERT(m_document->isHTMLDocument() || m_document->isSVGDocument() || m_docu
ment->isXHTMLDocument()); |
234 } | 234 } |
235 | 235 |
236 HTMLConstructionSite::~HTMLConstructionSite() | 236 HTMLConstructionSite::~HTMLConstructionSite() |
237 { | 237 { |
238 } | 238 } |
239 | 239 |
240 void HTMLConstructionSite::detach() | 240 void HTMLConstructionSite::detach() |
241 { | 241 { |
242 m_document = 0; | 242 m_document = 0; |
243 m_attachmentRoot = 0; | 243 m_attachmentRoot = 0; |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 { | 751 { |
752 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); | 752 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); |
753 findFosterSite(task); | 753 findFosterSite(task); |
754 task.child = node; | 754 task.child = node; |
755 ASSERT(task.parent); | 755 ASSERT(task.parent); |
756 | 756 |
757 m_taskQueue.append(task); | 757 m_taskQueue.append(task); |
758 } | 758 } |
759 | 759 |
760 } | 760 } |
OLD | NEW |