| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // Cancels the data source's pending loads. Conceptually, a data source only lo
ads | 213 // Cancels the data source's pending loads. Conceptually, a data source only lo
ads |
| 214 // one document at a time, but one document may have many related resources. | 214 // one document at a time, but one document may have many related resources. |
| 215 // stopLoading will stop all loads initiated by the data source, | 215 // stopLoading will stop all loads initiated by the data source, |
| 216 // but not loads initiated by child frames' data sources -- that's the WebFrame'
s job. | 216 // but not loads initiated by child frames' data sources -- that's the WebFrame'
s job. |
| 217 void DocumentLoader::stopLoading() | 217 void DocumentLoader::stopLoading() |
| 218 { | 218 { |
| 219 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get()); | 219 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get()); |
| 220 RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this); | 220 RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this); |
| 221 | 221 |
| 222 m_fetcher->stopFetching(); | |
| 223 if (isLoading()) | 222 if (isLoading()) |
| 224 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); | 223 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); |
| 224 m_fetcher->stopFetching(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void DocumentLoader::commitIfReady() | 227 void DocumentLoader::commitIfReady() |
| 228 { | 228 { |
| 229 if (!m_committed) { | 229 if (!m_committed) { |
| 230 m_committed = true; | 230 m_committed = true; |
| 231 frameLoader()->commitProvisionalLoad(); | 231 frameLoader()->commitProvisionalLoad(); |
| 232 } | 232 } |
| 233 } | 233 } |
| 234 | 234 |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 819 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
| 820 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 820 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
| 821 { | 821 { |
| 822 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 822 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 823 if (!source.isNull()) | 823 if (!source.isNull()) |
| 824 m_writer->appendReplacingData(source); | 824 m_writer->appendReplacingData(source); |
| 825 endWriting(m_writer.get()); | 825 endWriting(m_writer.get()); |
| 826 } | 826 } |
| 827 | 827 |
| 828 } // namespace blink | 828 } // namespace blink |
| OLD | NEW |