Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2393523002: Delay installing supplement objects (Closed)
Patch Set: temp Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698