| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 PassRefPtrWillBeRawPtr<HTMLFormElement> HTMLConstructionSite::takeForm() | 378 PassRefPtrWillBeRawPtr<HTMLFormElement> HTMLConstructionSite::takeForm() |
| 379 { | 379 { |
| 380 return m_form.release(); | 380 return m_form.release(); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded() | 383 void HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded() |
| 384 { | 384 { |
| 385 ASSERT(m_document); | 385 ASSERT(m_document); |
| 386 if (m_document->frame() && !m_isParsingFragment) | 386 if (m_document->frame() && !m_isParsingFragment) |
| 387 m_document->frame()->loader().dispatchDocumentElementAvailable(); | 387 m_document->frame()->loader().dispatchDocumentElementAvailable(); |
| 388 // dispatchDocumentElementAvailable might have invalidated m_document. |
| 388 } | 389 } |
| 389 | 390 |
| 390 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* tok
en) | 391 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* tok
en) |
| 391 { | 392 { |
| 392 ASSERT(m_document); | 393 ASSERT(m_document); |
| 393 RefPtrWillBeRawPtr<HTMLHtmlElement> element = HTMLHtmlElement::create(*m_doc
ument); | 394 RefPtrWillBeRawPtr<HTMLHtmlElement> element = HTMLHtmlElement::create(*m_doc
ument); |
| 394 setAttributes(element.get(), token, m_parserContentPolicy); | 395 setAttributes(element.get(), token, m_parserContentPolicy); |
| 395 attachLater(m_attachmentRoot, element); | 396 attachLater(m_attachmentRoot, element); |
| 396 m_openElements.pushHTMLHtmlElement(HTMLStackItem::create(element, token)); | 397 m_openElements.pushHTMLHtmlElement(HTMLStackItem::create(element, token)); |
| 397 | 398 |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 queueTask(task); | 872 queueTask(task); |
| 872 } | 873 } |
| 873 | 874 |
| 874 DEFINE_TRACE(HTMLConstructionSite::PendingText) | 875 DEFINE_TRACE(HTMLConstructionSite::PendingText) |
| 875 { | 876 { |
| 876 visitor->trace(parent); | 877 visitor->trace(parent); |
| 877 visitor->trace(nextChild); | 878 visitor->trace(nextChild); |
| 878 } | 879 } |
| 879 | 880 |
| 880 } // namespace blink | 881 } // namespace blink |
| OLD | NEW |