| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 33 */ | 33 */ |
| 34 | 34 |
| 35 #include "sky/engine/core/loader/FrameLoader.h" | 35 #include "sky/engine/core/loader/FrameLoader.h" |
| 36 | 36 |
| 37 #include "sky/engine/core/dom/Document.h" | 37 #include "sky/engine/core/dom/Document.h" |
| 38 #include "sky/engine/core/dom/Element.h" | 38 #include "sky/engine/core/dom/Element.h" |
| 39 #include "sky/engine/core/editing/Editor.h" | 39 #include "sky/engine/core/editing/Editor.h" |
| 40 #include "sky/engine/core/editing/UndoStack.h" | 40 #include "sky/engine/core/editing/UndoStack.h" |
| 41 #include "sky/engine/core/events/PageTransitionEvent.h" | 41 #include "sky/engine/core/events/PageTransitionEvent.h" |
| 42 #include "sky/engine/core/fetch/FetchContext.h" | |
| 43 #include "sky/engine/core/fetch/ResourceFetcher.h" | |
| 44 #include "sky/engine/core/fetch/ResourceLoader.h" | |
| 45 #include "sky/engine/core/frame/FrameHost.h" | 42 #include "sky/engine/core/frame/FrameHost.h" |
| 46 #include "sky/engine/core/frame/FrameView.h" | 43 #include "sky/engine/core/frame/FrameView.h" |
| 47 #include "sky/engine/core/frame/LocalDOMWindow.h" | 44 #include "sky/engine/core/frame/LocalDOMWindow.h" |
| 48 #include "sky/engine/core/frame/LocalFrame.h" | 45 #include "sky/engine/core/frame/LocalFrame.h" |
| 49 #include "sky/engine/core/frame/Settings.h" | 46 #include "sky/engine/core/frame/Settings.h" |
| 50 #include "sky/engine/core/inspector/ConsoleMessage.h" | 47 #include "sky/engine/core/inspector/ConsoleMessage.h" |
| 51 #include "sky/engine/core/loader/DocumentLoadTiming.h" | 48 #include "sky/engine/core/loader/DocumentLoadTiming.h" |
| 52 #include "sky/engine/core/loader/FrameFetchContext.h" | |
| 53 #include "sky/engine/core/loader/FrameLoaderClient.h" | 49 #include "sky/engine/core/loader/FrameLoaderClient.h" |
| 54 #include "sky/engine/core/loader/UniqueIdentifier.h" | 50 #include "sky/engine/core/loader/UniqueIdentifier.h" |
| 55 #include "sky/engine/core/page/ChromeClient.h" | 51 #include "sky/engine/core/page/ChromeClient.h" |
| 56 #include "sky/engine/core/page/EventHandler.h" | 52 #include "sky/engine/core/page/EventHandler.h" |
| 57 #include "sky/engine/core/page/Page.h" | 53 #include "sky/engine/core/page/Page.h" |
| 58 #include "sky/engine/platform/Logging.h" | 54 #include "sky/engine/platform/Logging.h" |
| 59 #include "sky/engine/platform/geometry/FloatRect.h" | 55 #include "sky/engine/platform/geometry/FloatRect.h" |
| 60 #include "sky/engine/platform/network/HTTPParsers.h" | 56 #include "sky/engine/platform/network/HTTPParsers.h" |
| 61 #include "sky/engine/platform/network/ResourceRequest.h" | 57 #include "sky/engine/platform/network/ResourceRequest.h" |
| 62 #include "sky/engine/platform/weborigin/SecurityPolicy.h" | 58 #include "sky/engine/platform/weborigin/SecurityPolicy.h" |
| 63 #include "sky/engine/public/platform/WebURLRequest.h" | 59 #include "sky/engine/public/platform/WebURLRequest.h" |
| 64 #include "sky/engine/wtf/TemporaryChange.h" | 60 #include "sky/engine/wtf/TemporaryChange.h" |
| 65 #include "sky/engine/wtf/text/CString.h" | 61 #include "sky/engine/wtf/text/CString.h" |
| 66 #include "sky/engine/wtf/text/WTFString.h" | 62 #include "sky/engine/wtf/text/WTFString.h" |
| 67 | 63 |
| 68 using blink::WebURLRequest; | 64 using blink::WebURLRequest; |
| 69 | 65 |
| 70 namespace blink { | 66 namespace blink { |
| 71 | 67 |
| 72 FrameLoader::FrameLoader(LocalFrame* frame) | 68 FrameLoader::FrameLoader(LocalFrame* frame) |
| 73 : m_frame(frame) | 69 : m_frame(frame) |
| 74 , m_fetchContext(FrameFetchContext::create(frame)) | |
| 75 , m_inStopAllLoaders(false) | 70 , m_inStopAllLoaders(false) |
| 76 { | 71 { |
| 77 } | 72 } |
| 78 | 73 |
| 79 FrameLoader::~FrameLoader() | 74 FrameLoader::~FrameLoader() |
| 80 { | 75 { |
| 81 } | 76 } |
| 82 | 77 |
| 83 void FrameLoader::stopLoading() | 78 void FrameLoader::stopLoading() |
| 84 { | 79 { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // the frame from underneath. | 141 // the frame from underneath. |
| 147 RefPtr<LocalFrame> protect(m_frame); | 142 RefPtr<LocalFrame> protect(m_frame); |
| 148 | 143 |
| 149 m_inStopAllLoaders = true; | 144 m_inStopAllLoaders = true; |
| 150 | 145 |
| 151 // Attempt to stop the frame if the document loader is loading, or if it is
done loading but | 146 // Attempt to stop the frame if the document loader is loading, or if it is
done loading but |
| 152 // still parsing. Failure to do so can cause a world leak. | 147 // still parsing. Failure to do so can cause a world leak. |
| 153 if (m_frame->document()->parsing()) | 148 if (m_frame->document()->parsing()) |
| 154 stopLoading(); | 149 stopLoading(); |
| 155 | 150 |
| 156 m_frame->document()->fetcher()->stopFetching(); | |
| 157 | |
| 158 m_inStopAllLoaders = false; | 151 m_inStopAllLoaders = false; |
| 159 } | 152 } |
| 160 | 153 |
| 161 } // namespace blink | 154 } // namespace blink |
| OLD | NEW |