| 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 // We shouldn't have any queued tasks but we might have pending text which w
e need to promote to tasks and execute. | 540 // We shouldn't have any queued tasks but we might have pending text which w
e need to promote to tasks and execute. |
| 541 ASSERT(m_taskQueue.isEmpty()); | 541 ASSERT(m_taskQueue.isEmpty()); |
| 542 flush(); | 542 flush(); |
| 543 m_document->finishedParsing(); | 543 m_document->finishedParsing(); |
| 544 } | 544 } |
| 545 | 545 |
| 546 void HTMLConstructionSite::insertDoctype(AtomicHTMLToken* token) | 546 void HTMLConstructionSite::insertDoctype(AtomicHTMLToken* token) |
| 547 { | 547 { |
| 548 ASSERT(token->type() == HTMLToken::DOCTYPE); | 548 ASSERT(token->type() == HTMLToken::DOCTYPE); |
| 549 | 549 |
| 550 const String& publicId = StringImpl::create8BitIfPossible(token->publicIdent
ifier()); | 550 const String& publicId = token->publicIdentifier(); |
| 551 const String& systemId = StringImpl::create8BitIfPossible(token->systemIdent
ifier()); | 551 const String& systemId = token->systemIdentifier(); |
| 552 RefPtrWillBeRawPtr<DocumentType> doctype = DocumentType::create(m_document,
token->name(), publicId, systemId); | 552 RefPtrWillBeRawPtr<DocumentType> doctype = DocumentType::create(m_document,
token->name(), publicId, systemId); |
| 553 attachLater(m_attachmentRoot, doctype.release()); | 553 attachLater(m_attachmentRoot, doctype.release()); |
| 554 | 554 |
| 555 // DOCTYPE nodes are only processed when parsing fragments w/o contextElemen
ts, which | 555 // DOCTYPE nodes are only processed when parsing fragments w/o contextElemen
ts, which |
| 556 // never occurs. However, if we ever chose to support such, this code is su
btly wrong, | 556 // never occurs. However, if we ever chose to support such, this code is su
btly wrong, |
| 557 // because context-less fragments can determine their own quirks mode, and t
hus change | 557 // because context-less fragments can determine their own quirks mode, and t
hus change |
| 558 // parsing rules (like <p> inside <table>). For now we ASSERT that we never
hit this code | 558 // parsing rules (like <p> inside <table>). For now we ASSERT that we never
hit this code |
| 559 // in a fragment, as changing the owning document's compatibility mode would
be wrong. | 559 // in a fragment, as changing the owning document's compatibility mode would
be wrong. |
| 560 ASSERT(!m_isParsingFragment); | 560 ASSERT(!m_isParsingFragment); |
| 561 if (m_isParsingFragment) | 561 if (m_isParsingFragment) |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 } | 870 } |
| 871 | 871 |
| 872 void HTMLConstructionSite::PendingText::trace(Visitor* visitor) | 872 void HTMLConstructionSite::PendingText::trace(Visitor* visitor) |
| 873 { | 873 { |
| 874 visitor->trace(parent); | 874 visitor->trace(parent); |
| 875 visitor->trace(nextChild); | 875 visitor->trace(nextChild); |
| 876 } | 876 } |
| 877 | 877 |
| 878 | 878 |
| 879 } | 879 } |
| OLD | NEW |