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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 514 |
515 // Prepare a DocumentInit before clearing the frame, because it may need to | 515 // Prepare a DocumentInit before clearing the frame, because it may need to |
516 // inherit an aliased security context. | 516 // inherit an aliased security context. |
517 DocumentInit init(url(), m_frame); | 517 DocumentInit init(url(), m_frame); |
518 init.withNewRegistrationContext(); | 518 init.withNewRegistrationContext(); |
519 m_frame->loader().clear(); | 519 m_frame->loader().clear(); |
520 ASSERT(m_frame->page()); | 520 ASSERT(m_frame->page()); |
521 | 521 |
522 m_writer = createWriterFor(0, init, mimeType, encoding, false); | 522 m_writer = createWriterFor(0, init, mimeType, encoding, false); |
523 m_writer->setDocumentWasLoadedAsPartOfNavigation(); | 523 m_writer->setDocumentWasLoadedAsPartOfNavigation(); |
| 524 |
| 525 if (m_substituteData.isValid() && m_substituteData.forceSynchronousLoad()) |
| 526 m_writer->forceSynchronousParse(); |
| 527 |
524 // This should be set before receivedFirstData(). | 528 // This should be set before receivedFirstData(). |
525 if (!overridingURL.isEmpty()) | 529 if (!overridingURL.isEmpty()) |
526 m_frame->document()->setBaseURLOverride(overridingURL); | 530 m_frame->document()->setBaseURLOverride(overridingURL); |
527 | 531 |
528 // Call receivedFirstData() exactly once per load. | 532 // Call receivedFirstData() exactly once per load. |
529 frameLoader()->receivedFirstData(); | 533 frameLoader()->receivedFirstData(); |
530 m_frame->document()->maybeHandleHttpRefresh(m_response.httpHeaderField("Refr
esh"), Document::HttpRefreshFromHeader); | 534 m_frame->document()->maybeHandleHttpRefresh(m_response.httpHeaderField("Refr
esh"), Document::HttpRefreshFromHeader); |
531 } | 535 } |
532 | 536 |
533 void DocumentLoader::commitData(const char* bytes, size_t length) | 537 void DocumentLoader::commitData(const char* bytes, size_t length) |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 835 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
832 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 836 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
833 { | 837 { |
834 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); | 838 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); |
835 if (!source.isNull()) | 839 if (!source.isNull()) |
836 m_writer->appendReplacingData(source); | 840 m_writer->appendReplacingData(source); |
837 endWriting(m_writer.get()); | 841 endWriting(m_writer.get()); |
838 } | 842 } |
839 | 843 |
840 } // namespace blink | 844 } // namespace blink |
OLD | NEW |