| 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 = AllowAsynchronousParsing; | 529 ParserSynchronizationPolicy parsingPolicy = AllowAsynchronousParsing; |
| 530 if ((m_substituteData.isValid() && m_substituteData.forceSynchronousLoad())
|| !Document::threadedParsingEnabledForTesting()) | 530 if ((m_substituteData.isValid() && m_substituteData.forceSynchronousLoad())
|| !Document::threadedParsingEnabledForUnitTestsOnly()) |
| 531 parsingPolicy = ForceSynchronousParsing; | 531 parsingPolicy = ForceSynchronousParsing; |
| 532 | 532 |
| 533 m_writer = createWriterFor(0, init, mimeType, encoding, false, parsingPolicy
); | 533 m_writer = createWriterFor(0, init, mimeType, encoding, false, parsingPolicy
); |
| 534 m_writer->setDocumentWasLoadedAsPartOfNavigation(); | 534 m_writer->setDocumentWasLoadedAsPartOfNavigation(); |
| 535 | 535 |
| 536 // This should be set before receivedFirstData(). | 536 // This should be set before receivedFirstData(). |
| 537 if (!overridingURL.isEmpty()) | 537 if (!overridingURL.isEmpty()) |
| 538 m_frame->document()->setBaseURLOverride(overridingURL); | 538 m_frame->document()->setBaseURLOverride(overridingURL); |
| 539 | 539 |
| 540 // Call receivedFirstData() exactly once per load. | 540 // Call receivedFirstData() exactly once per load. |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 { | 865 { |
| 866 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); |
| 867 if (!source.isNull()) | 867 if (!source.isNull()) |
| 868 m_writer->appendReplacingData(source); | 868 m_writer->appendReplacingData(source); |
| 869 endWriting(m_writer.get()); | 869 endWriting(m_writer.get()); |
| 870 } | 870 } |
| 871 | 871 |
| 872 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 872 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 873 | 873 |
| 874 } // namespace blink | 874 } // namespace blink |
| OLD | NEW |