| 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 if (!init.shouldReuseDefaultView()) | 688 if (!init.shouldReuseDefaultView()) |
| 689 frame->setDOMWindow(LocalDOMWindow::create(*frame)); | 689 frame->setDOMWindow(LocalDOMWindow::create(*frame)); |
| 690 | 690 |
| 691 Document* document = frame->localDOMWindow()->installNewDocument(mimeType, i
nit); | 691 Document* document = frame->localDOMWindow()->installNewDocument(mimeType, i
nit); |
| 692 | 692 |
| 693 // This should be set before receivedFirstData(). | 693 // This should be set before receivedFirstData(). |
| 694 if (!overridingURL.isEmpty()) | 694 if (!overridingURL.isEmpty()) |
| 695 frame->document()->setBaseURLOverride(overridingURL); | 695 frame->document()->setBaseURLOverride(overridingURL); |
| 696 | 696 |
| 697 frame->loader().didInstallNewDocument(dispatchWindowObjectAvailable); | 697 frame->loader().didInstallNewDocument(dispatchWindowObjectAvailable); |
| 698 frame->didInstallNewDocument(); |
| 698 | 699 |
| 699 // This must be called before DocumentWriter is created, otherwise HTML pars
er | 700 // This must be called before DocumentWriter is created, otherwise HTML pars
er |
| 700 // will use stale values from HTMLParserOption. | 701 // will use stale values from HTMLParserOption. |
| 701 if (!dispatchWindowObjectAvailable) | 702 if (!dispatchWindowObjectAvailable) |
| 702 frame->loader().receivedFirstData(); | 703 frame->loader().receivedFirstData(); |
| 703 | 704 |
| 704 frame->loader().didBeginDocument(); | 705 frame->loader().didBeginDocument(); |
| 705 | 706 |
| 706 return DocumentWriter::create(document, parsingPolicy, mimeType, encoding); | 707 return DocumentWriter::create(document, parsingPolicy, mimeType, encoding); |
| 707 } | 708 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 718 { | 719 { |
| 719 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding()
: emptyAtom, true, ForceSynchronousParsing); | 720 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding()
: emptyAtom, true, ForceSynchronousParsing); |
| 720 if (!source.isNull()) | 721 if (!source.isNull()) |
| 721 m_writer->appendReplacingData(source); | 722 m_writer->appendReplacingData(source); |
| 722 endWriting(m_writer.get()); | 723 endWriting(m_writer.get()); |
| 723 } | 724 } |
| 724 | 725 |
| 725 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 726 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 726 | 727 |
| 727 } // namespace blink | 728 } // namespace blink |
| OLD | NEW |