| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 | 709 |
| 710 DCHECK(!frame->document() || !frame->document()->isActive()); | 710 DCHECK(!frame->document() || !frame->document()->isActive()); |
| 711 DCHECK_EQ(frame->tree().childCount(), 0u); | 711 DCHECK_EQ(frame->tree().childCount(), 0u); |
| 712 | 712 |
| 713 if (!init.shouldReuseDefaultView()) | 713 if (!init.shouldReuseDefaultView()) |
| 714 frame->setDOMWindow(LocalDOMWindow::create(*frame)); | 714 frame->setDOMWindow(LocalDOMWindow::create(*frame)); |
| 715 | 715 |
| 716 Document* document = | 716 Document* document = |
| 717 frame->localDOMWindow()->installNewDocument(mimeType, init); | 717 frame->localDOMWindow()->installNewDocument(mimeType, init); |
| 718 | 718 |
| 719 if (!init.shouldReuseDefaultView()) |
| 720 frame->page()->chromeClient().installSupplements(*frame); |
| 721 |
| 719 // This should be set before receivedFirstData(). | 722 // This should be set before receivedFirstData(). |
| 720 if (!overridingURL.isEmpty()) | 723 if (!overridingURL.isEmpty()) |
| 721 frame->document()->setBaseURLOverride(overridingURL); | 724 frame->document()->setBaseURLOverride(overridingURL); |
| 722 | 725 |
| 723 frame->loader().didInstallNewDocument(dispatchWindowObjectAvailable); | 726 frame->loader().didInstallNewDocument(dispatchWindowObjectAvailable); |
| 724 | 727 |
| 725 // This must be called before DocumentWriter is created, otherwise HTML parser | 728 // This must be called before DocumentWriter is created, otherwise HTML parser |
| 726 // will use stale values from HTMLParserOption. | 729 // will use stale values from HTMLParserOption. |
| 727 if (!dispatchWindowObjectAvailable) | 730 if (!dispatchWindowObjectAvailable) |
| 728 frame->loader().receivedFirstData(); | 731 frame->loader().receivedFirstData(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 747 m_writer ? m_writer->encoding() : emptyAtom, true, | 750 m_writer ? m_writer->encoding() : emptyAtom, true, |
| 748 ForceSynchronousParsing); | 751 ForceSynchronousParsing); |
| 749 if (!source.isNull()) | 752 if (!source.isNull()) |
| 750 m_writer->appendReplacingData(source); | 753 m_writer->appendReplacingData(source); |
| 751 endWriting(m_writer.get()); | 754 endWriting(m_writer.get()); |
| 752 } | 755 } |
| 753 | 756 |
| 754 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 757 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 755 | 758 |
| 756 } // namespace blink | 759 } // namespace blink |
| OLD | NEW |