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

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

Issue 1313013005: Add a test that we resume commits after inserting the body. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: dcheng@ review Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 519
520 const AtomicString& encoding = m_frame->host()->overrideEncoding().isNull() ? response().textEncodingName() : m_frame->host()->overrideEncoding(); 520 const AtomicString& encoding = m_frame->host()->overrideEncoding().isNull() ? response().textEncodingName() : m_frame->host()->overrideEncoding();
521 521
522 // Prepare a DocumentInit before clearing the frame, because it may need to 522 // Prepare a DocumentInit before clearing the frame, because it may need to
523 // inherit an aliased security context. 523 // inherit an aliased security context.
524 DocumentInit init(url(), m_frame); 524 DocumentInit init(url(), m_frame);
525 init.withNewRegistrationContext(); 525 init.withNewRegistrationContext();
526 m_frame->loader().clear(); 526 m_frame->loader().clear();
527 ASSERT(m_frame->page()); 527 ASSERT(m_frame->page());
528 528
529 ParserSynchronizationPolicy parsingPolicy = (m_substituteData.isValid() && m _substituteData.forceSynchronousLoad()) ? ForceSynchronousParsing : AllowAsynchr onousParsing; 529 ParserSynchronizationPolicy parsingPolicy = AllowAsynchronousParsing;
530 if ((m_substituteData.isValid() && m_substituteData.forceSynchronousLoad()) || !Document::threadedParsingEnabledForUnitTestsOnly())
531 parsingPolicy = ForceSynchronousParsing;
532
530 m_writer = createWriterFor(0, init, mimeType, encoding, false, parsingPolicy ); 533 m_writer = createWriterFor(0, init, mimeType, encoding, false, parsingPolicy );
531 m_writer->setDocumentWasLoadedAsPartOfNavigation(); 534 m_writer->setDocumentWasLoadedAsPartOfNavigation();
532 535
533 // This should be set before receivedFirstData(). 536 // This should be set before receivedFirstData().
534 if (!overridingURL.isEmpty()) 537 if (!overridingURL.isEmpty())
535 m_frame->document()->setBaseURLOverride(overridingURL); 538 m_frame->document()->setBaseURLOverride(overridingURL);
536 539
537 // Call receivedFirstData() exactly once per load. 540 // Call receivedFirstData() exactly once per load.
538 frameLoader()->receivedFirstData(); 541 frameLoader()->receivedFirstData();
539 m_frame->document()->maybeHandleHttpRefresh(m_response.httpHeaderField("Refr esh"), Document::HttpRefreshFromHeader); 542 m_frame->document()->maybeHandleHttpRefresh(m_response.httpHeaderField("Refr esh"), Document::HttpRefreshFromHeader);
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 { 865 {
863 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing); 866 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing);
864 if (!source.isNull()) 867 if (!source.isNull())
865 m_writer->appendReplacingData(source); 868 m_writer->appendReplacingData(source);
866 endWriting(m_writer.get()); 869 endWriting(m_writer.get());
867 } 870 }
868 871
869 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 872 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
870 873
871 } // namespace blink 874 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698