| 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 | 602 |
| 603 commitIfReady(); | 603 commitIfReady(); |
| 604 if (!frameLoader()) | 604 if (!frameLoader()) |
| 605 return; | 605 return; |
| 606 if (isArchiveMIMEType(response().mimeType())) | 606 if (isArchiveMIMEType(response().mimeType())) |
| 607 return; | 607 return; |
| 608 commitData(data, length); | 608 commitData(data, length); |
| 609 | 609 |
| 610 // If we are sending data to MediaDocument, we should stop here | 610 // If we are sending data to MediaDocument, we should stop here |
| 611 // and cancel the request. | 611 // and cancel the request. |
| 612 if (m_frame->document()->isMediaDocument()) | 612 if (m_frame && m_frame->document()->isMediaDocument()) |
| 613 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); | 613 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); |
| 614 } | 614 } |
| 615 | 615 |
| 616 void DocumentLoader::checkLoadComplete() | 616 void DocumentLoader::checkLoadComplete() |
| 617 { | 617 { |
| 618 if (!m_frame || isLoading()) | 618 if (!m_frame || isLoading()) |
| 619 return; | 619 return; |
| 620 // FIXME: This ASSERT is always triggered. | 620 // FIXME: This ASSERT is always triggered. |
| 621 // See https://bugs.webkit.org/show_bug.cgi?id=110937 | 621 // See https://bugs.webkit.org/show_bug.cgi?id=110937 |
| 622 // ASSERT(this == frameLoader()->activeDocumentLoader()) | 622 // ASSERT(this == frameLoader()->activeDocumentLoader()) |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 941 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
| 942 { | 942 { |
| 943 m_frame->loader()->stopAllLoaders(); | 943 m_frame->loader()->stopAllLoaders(); |
| 944 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); | 944 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); |
| 945 if (!source.isNull()) | 945 if (!source.isNull()) |
| 946 m_writer->appendReplacingData(source); | 946 m_writer->appendReplacingData(source); |
| 947 endWriting(m_writer.get()); | 947 endWriting(m_writer.get()); |
| 948 } | 948 } |
| 949 | 949 |
| 950 } // namespace WebCore | 950 } // namespace WebCore |
| OLD | NEW |