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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
474 void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken* token, bool is Demoted) | 474 void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken* token, bool is Demoted) |
475 { | 475 { |
476 RefPtr<Element> element = createHTMLElement(token); | 476 RefPtr<Element> element = createHTMLElement(token); |
477 ASSERT(element->hasTagName(formTag)); | 477 ASSERT(element->hasTagName(formTag)); |
478 m_form = static_pointer_cast<HTMLFormElement>(element.release()); | 478 m_form = static_pointer_cast<HTMLFormElement>(element.release()); |
479 m_form->setDemoted(isDemoted); | 479 m_form->setDemoted(isDemoted); |
480 attachLater(currentNode(), m_form); | 480 attachLater(currentNode(), m_form); |
481 m_openElements.push(HTMLStackItem::create(m_form, token)); | 481 m_openElements.push(HTMLStackItem::create(m_form, token)); |
482 } | 482 } |
483 | 483 |
484 void HTMLConstructionSite::insertHTMLFramesetElement(AtomicHTMLToken* token) | |
485 { | |
486 ASSERT(element->hasTagName(framesetTag)); | |
487 insertHTMLElement(token); | |
488 if (Frame* frame = m_document->frame()) { | |
489 // A document with frames won't literally have a body, but the frameset is effectively the body. | |
490 frame->loader()->client()->dispatchWillInsertBody(); | |
abarth-chromium
2013/06/03 22:12:46
This is a bad dependency. We want it to be possib
| |
491 } | |
492 } | |
493 | |
484 void HTMLConstructionSite::insertHTMLElement(AtomicHTMLToken* token) | 494 void HTMLConstructionSite::insertHTMLElement(AtomicHTMLToken* token) |
485 { | 495 { |
486 RefPtr<Element> element = createHTMLElement(token); | 496 RefPtr<Element> element = createHTMLElement(token); |
487 attachLater(currentNode(), element); | 497 attachLater(currentNode(), element); |
488 m_openElements.push(HTMLStackItem::create(element.release(), token)); | 498 m_openElements.push(HTMLStackItem::create(element.release(), token)); |
489 } | 499 } |
490 | 500 |
491 void HTMLConstructionSite::insertSelfClosingHTMLElement(AtomicHTMLToken* token) | 501 void HTMLConstructionSite::insertSelfClosingHTMLElement(AtomicHTMLToken* token) |
492 { | 502 { |
493 ASSERT(token->type() == HTMLToken::StartTag); | 503 ASSERT(token->type() == HTMLToken::StartTag); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
751 { | 761 { |
752 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); | 762 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); |
753 findFosterSite(task); | 763 findFosterSite(task); |
754 task.child = node; | 764 task.child = node; |
755 ASSERT(task.parent); | 765 ASSERT(task.parent); |
756 | 766 |
757 m_taskQueue.append(task); | 767 m_taskQueue.append(task); |
758 } | 768 } |
759 | 769 |
760 } | 770 } |
OLD | NEW |