| 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 m_openElements.pushHTMLBodyElement(HTMLStackItem::create(body, token)); | 669 m_openElements.pushHTMLBodyElement(HTMLStackItem::create(body, token)); |
| 670 if (m_document) | 670 if (m_document) |
| 671 m_document->willInsertBody(); | 671 m_document->willInsertBody(); |
| 672 } | 672 } |
| 673 | 673 |
| 674 void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken* token, | 674 void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken* token, |
| 675 bool isDemoted) { | 675 bool isDemoted) { |
| 676 HTMLElement* element = createHTMLElement(token); | 676 HTMLElement* element = createHTMLElement(token); |
| 677 ASSERT(isHTMLFormElement(element)); | 677 ASSERT(isHTMLFormElement(element)); |
| 678 HTMLFormElement* formElement = toHTMLFormElement(element); | 678 HTMLFormElement* formElement = toHTMLFormElement(element); |
| 679 if (!ownerDocumentForCurrentNode().isTemplateDocument()) | 679 if (!openElements()->hasTemplateInHTMLScope()) |
| 680 m_form = formElement; | 680 m_form = formElement; |
| 681 formElement->setDemoted(isDemoted); | 681 formElement->setDemoted(isDemoted); |
| 682 attachLater(currentNode(), formElement); | 682 attachLater(currentNode(), formElement); |
| 683 m_openElements.push(HTMLStackItem::create(formElement, token)); | 683 m_openElements.push(HTMLStackItem::create(formElement, token)); |
| 684 } | 684 } |
| 685 | 685 |
| 686 void HTMLConstructionSite::insertHTMLElement(AtomicHTMLToken* token) { | 686 void HTMLConstructionSite::insertHTMLElement(AtomicHTMLToken* token) { |
| 687 HTMLElement* element = createHTMLElement(token); | 687 HTMLElement* element = createHTMLElement(token); |
| 688 attachLater(currentNode(), element); | 688 attachLater(currentNode(), element); |
| 689 m_openElements.push(HTMLStackItem::create(element, token)); | 689 m_openElements.push(HTMLStackItem::create(element, token)); |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 ASSERT(task.parent); | 1057 ASSERT(task.parent); |
| 1058 queueTask(task); | 1058 queueTask(task); |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 DEFINE_TRACE(HTMLConstructionSite::PendingText) { | 1061 DEFINE_TRACE(HTMLConstructionSite::PendingText) { |
| 1062 visitor->trace(parent); | 1062 visitor->trace(parent); |
| 1063 visitor->trace(nextChild); | 1063 visitor->trace(nextChild); |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 } // namespace blink | 1066 } // namespace blink |
| OLD | NEW |