Chromium Code Reviews| 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 if (frame->loader().stateMachine()->committedFirstRealDocumentLoad()) | |
| 699 frame->didInstallNewRealDocument(); | |
|
dcheng
2016/08/26 18:28:29
I think it would be nicer if we could do this with
dgrogan
2016/08/26 18:54:06
This allowed the enum and logging code to live sol
| |
| 698 | 700 |
| 699 // This must be called before DocumentWriter is created, otherwise HTML pars er | 701 // This must be called before DocumentWriter is created, otherwise HTML pars er |
| 700 // will use stale values from HTMLParserOption. | 702 // will use stale values from HTMLParserOption. |
| 701 if (!dispatchWindowObjectAvailable) | 703 if (!dispatchWindowObjectAvailable) |
| 702 frame->loader().receivedFirstData(); | 704 frame->loader().receivedFirstData(); |
| 703 | 705 |
| 704 frame->loader().didBeginDocument(); | 706 frame->loader().didBeginDocument(); |
| 705 | 707 |
| 706 return DocumentWriter::create(document, parsingPolicy, mimeType, encoding); | 708 return DocumentWriter::create(document, parsingPolicy, mimeType, encoding); |
| 707 } | 709 } |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 718 { | 720 { |
| 719 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); | 721 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 720 if (!source.isNull()) | 722 if (!source.isNull()) |
| 721 m_writer->appendReplacingData(source); | 723 m_writer->appendReplacingData(source); |
| 722 endWriting(m_writer.get()); | 724 endWriting(m_writer.get()); |
| 723 } | 725 } |
| 724 | 726 |
| 725 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 727 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 726 | 728 |
| 727 } // namespace blink | 729 } // namespace blink |
| OLD | NEW |