| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |