ddkilzer | f416338 | 2006-08-04 11:23:37 +0000 | [diff] [blame] | 1 | /* |
aestes@apple.com | 5e14373 | 2011-03-25 23:07:43 +0000 | [diff] [blame] | 2 | * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. |
zimmermann@webkit.org | 1ef223d | 2009-07-27 17:04:35 +0000 | [diff] [blame] | 3 | * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) |
staikos@webkit.org | c769212 | 2009-10-28 18:12:34 +0000 | [diff] [blame] | 4 | * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
commit-queue@webkit.org | 343b8a6 | 2011-09-21 01:49:03 +0000 | [diff] [blame] | 5 | * Copyright (C) 2011 Google Inc. All rights reserved. |
ddkilzer | f416338 | 2006-08-04 11:23:37 +0000 | [diff] [blame] | 6 | * |
| 7 | * Redistribution and use in source and binary forms, with or without |
| 8 | * modification, are permitted provided that the following conditions |
| 9 | * are met: |
| 10 | * |
| 11 | * 1. Redistributions of source code must retain the above copyright |
| 12 | * notice, this list of conditions and the following disclaimer. |
| 13 | * 2. Redistributions in binary form must reproduce the above copyright |
| 14 | * notice, this list of conditions and the following disclaimer in the |
| 15 | * documentation and/or other materials provided with the distribution. |
| 16 | * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
| 17 | * its contributors may be used to endorse or promote products derived |
| 18 | * from this software without specific prior written permission. |
| 19 | * |
| 20 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 21 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 23 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 29 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 | */ |
darin | 8207db4 | 2007-02-20 18:18:39 +0000 | [diff] [blame] | 31 | |
andersca | 799c716 | 2006-11-10 19:16:18 +0000 | [diff] [blame] | 32 | #ifndef FrameLoader_h |
| 33 | #define FrameLoader_h |
ddkilzer | f416338 | 2006-08-04 11:23:37 +0000 | [diff] [blame] | 34 | |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 35 | #include "CachePolicy.h" |
japhet@chromium.org | 61d4b9c | 2010-06-21 20:06:02 +0000 | [diff] [blame] | 36 | #include "FrameLoaderStateMachine.h" |
darin | c111655 | 2006-10-30 20:05:39 +0000 | [diff] [blame] | 37 | #include "FrameLoaderTypes.h" |
abarth@webkit.org | 47a4b62 | 2009-10-10 09:11:39 +0000 | [diff] [blame] | 38 | #include "HistoryController.h" |
abarth@webkit.org | 4e00997 | 2011-06-13 20:36:03 +0000 | [diff] [blame] | 39 | #include "IconController.h" |
commit-queue@webkit.org | e46967d | 2011-05-04 21:02:54 +0000 | [diff] [blame] | 40 | #include "IconURL.h" |
bdakin@apple.com | 0b27e9a | 2012-09-25 20:01:33 +0000 | [diff] [blame] | 41 | #include "LayoutMilestones.h" |
abarth@webkit.org | 390b102 | 2009-10-08 06:17:22 +0000 | [diff] [blame] | 42 | #include "PolicyChecker.h" |
japhet@chromium.org | 40d9a46 | 2011-08-26 17:41:25 +0000 | [diff] [blame] | 43 | #include "ResourceHandle.h" |
abarth@webkit.org | c69b85e | 2009-10-16 05:32:24 +0000 | [diff] [blame] | 44 | #include "ResourceLoadNotifier.h" |
abarth@webkit.org | 43ef0fd | 2011-11-07 21:01:14 +0000 | [diff] [blame] | 45 | #include "SecurityContext.h" |
japhet@chromium.org | f102691 | 2010-06-21 22:33:49 +0000 | [diff] [blame] | 46 | #include "SubframeLoader.h" |
darin@apple.com | 3e601a6 | 2009-01-03 02:04:30 +0000 | [diff] [blame] | 47 | #include "Timer.h" |
darin@apple.com | 4d9d718 | 2009-09-23 00:38:04 +0000 | [diff] [blame] | 48 | #include <wtf/Forward.h> |
tonyg@chromium.org | b625f85 | 2011-01-10 16:41:49 +0000 | [diff] [blame] | 49 | #include <wtf/HashSet.h> |
darin@apple.com | 3e601a6 | 2009-01-03 02:04:30 +0000 | [diff] [blame] | 50 | |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 51 | namespace WebCore { |
darin | 724e0f6 | 2006-10-09 01:48:10 +0000 | [diff] [blame] | 52 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 53 | class Archive; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 54 | class CachedFrameBase; |
| 55 | class CachedPage; |
| 56 | class CachedResource; |
rniwa@webkit.org | cf46007 | 2011-01-08 02:15:10 +0000 | [diff] [blame] | 57 | class Chrome; |
aroben@apple.com | 11dd526 | 2009-11-13 23:49:05 +0000 | [diff] [blame] | 58 | class DOMWrapperWorld; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 59 | class DocumentLoader; |
| 60 | class Event; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 61 | class FormState; |
dglazkov@chromium.org | 25a57e5 | 2010-06-20 21:00:35 +0000 | [diff] [blame] | 62 | class FormSubmission; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 63 | class FrameLoaderClient; |
diegohcg@webkit.org | 838e0a2 | 2010-09-04 14:48:30 +0000 | [diff] [blame] | 64 | class FrameNetworkingContext; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 65 | class NavigationAction; |
diegohcg@webkit.org | 838e0a2 | 2010-09-04 14:48:30 +0000 | [diff] [blame] | 66 | class NetworkingContext; |
commit-queue@webkit.org | 0a1f64b | 2010-10-26 21:10:47 +0000 | [diff] [blame] | 67 | class Page; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 68 | class ResourceError; |
tonyg@chromium.org | b625f85 | 2011-01-10 16:41:49 +0000 | [diff] [blame] | 69 | class ResourceRequest; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 70 | class ResourceResponse; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 71 | class SecurityOrigin; |
beidson@apple.com | 08c6175 | 2009-12-03 19:04:40 +0000 | [diff] [blame] | 72 | class SerializedScriptValue; |
evan@chromium.org | c3532e9 | 2011-03-31 15:17:13 +0000 | [diff] [blame] | 73 | class StringWithDirection; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 74 | class SubstituteData; |
darin | 7c9aa2d | 2006-11-05 01:06:47 +0000 | [diff] [blame] | 75 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 76 | struct FrameLoadRequest; |
| 77 | struct WindowFeatures; |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 78 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 79 | bool isBackForwardLoadType(FrameLoadType); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 80 | |
ossy@webkit.org | 95c1bc4 | 2011-01-20 16:30:54 +0000 | [diff] [blame] | 81 | class FrameLoader { |
| 82 | WTF_MAKE_NONCOPYABLE(FrameLoader); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 83 | public: |
| 84 | FrameLoader(Frame*, FrameLoaderClient*); |
| 85 | ~FrameLoader(); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 86 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 87 | void init(); |
mjs | 8d620d5 | 2007-05-10 12:31:42 +0000 | [diff] [blame] | 88 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 89 | Frame* frame() const { return m_frame; } |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 90 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 91 | PolicyChecker* policyChecker() const { return &m_policyChecker; } |
| 92 | HistoryController* history() const { return &m_history; } |
| 93 | ResourceLoadNotifier* notifier() const { return &m_notifer; } |
japhet@chromium.org | f102691 | 2010-06-21 22:33:49 +0000 | [diff] [blame] | 94 | SubframeLoader* subframeLoader() const { return &m_subframeLoader; } |
abarth@webkit.org | 4e00997 | 2011-06-13 20:36:03 +0000 | [diff] [blame] | 95 | IconController* icon() const { return &m_icon; } |
abarth@webkit.org | 453854e | 2009-10-08 03:17:08 +0000 | [diff] [blame] | 96 | |
gavinp@chromium.org | e89ace3 | 2011-08-18 11:10:44 +0000 | [diff] [blame] | 97 | void prepareForHistoryNavigation(); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 98 | void setupForReplace(); |
mrowe@apple.com | 713db2e | 2008-07-27 03:49:29 +0000 | [diff] [blame] | 99 | |
eric@webkit.org | 312451c | 2011-06-21 01:35:18 +0000 | [diff] [blame] | 100 | // FIXME: These are all functions which start loads. We have too many. |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 101 | void loadURLIntoChildFrame(const KURL&, const String& referer, Frame*); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 102 | void loadFrameRequest(const FrameLoadRequest&, bool lockHistory, bool lockBackForwardList, // Called by submitForm, calls loadPostRequest and loadURL. |
jochen@chromium.org | 46be537 | 2011-11-15 23:52:28 +0000 | [diff] [blame] | 103 | PassRefPtr<Event>, PassRefPtr<FormState>, ShouldSendReferrer); |
beidson | 50c3bd8 | 2007-01-03 03:11:18 +0000 | [diff] [blame] | 104 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 105 | void load(const ResourceRequest&, bool lockHistory); // Called by WebFrame, calls load(ResourceRequest, SubstituteData). |
| 106 | void load(const ResourceRequest&, const SubstituteData&, bool lockHistory); // Called both by WebFrame and internally, calls load(DocumentLoader*). |
| 107 | void load(const ResourceRequest&, const String& frameName, bool lockHistory); // Called by WebPluginController. |
jcivelli@chromium.org | c2019dd | 2011-05-24 19:32:03 +0000 | [diff] [blame] | 108 | #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML) |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 109 | void loadArchive(PassRefPtr<Archive>); |
jeremy@chromium.org | c4b86e3 | 2011-02-13 20:28:39 +0000 | [diff] [blame] | 110 | #endif |
eric@webkit.org | 312451c | 2011-06-21 01:35:18 +0000 | [diff] [blame] | 111 | unsigned long loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data); |
| 112 | |
jochen@chromium.org | 44476f4 | 2011-08-08 19:54:46 +0000 | [diff] [blame] | 113 | void changeLocation(SecurityOrigin*, const KURL&, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool refresh = false); |
jochen@chromium.org | 46be537 | 2011-11-15 23:52:28 +0000 | [diff] [blame] | 114 | void urlSelected(const KURL&, const String& target, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, ShouldSendReferrer); |
eric@webkit.org | 312451c | 2011-06-21 01:35:18 +0000 | [diff] [blame] | 115 | void submitForm(PassRefPtr<FormSubmission>); |
| 116 | |
| 117 | void reload(bool endToEndReload = false); |
| 118 | void reloadWithOverrideEncoding(const String& overrideEncoding); |
commit-queue@webkit.org | 2090e27 | 2012-06-28 16:05:43 +0000 | [diff] [blame] | 119 | void reloadWithOverrideURL(const KURL& overrideUrl, bool endToEndReload = false); |
eric@webkit.org | 312451c | 2011-06-21 01:35:18 +0000 | [diff] [blame] | 120 | |
| 121 | void open(CachedFrameBase&); |
| 122 | void loadItem(HistoryItem*, FrameLoadType); |
tkent@chromium.org | 93d9290 | 2012-03-02 02:29:59 +0000 | [diff] [blame] | 123 | HistoryItem* requestedHistoryItem() const { return m_requestedHistoryItem.get(); } |
ggaren | ec05502 | 2006-10-27 02:55:45 +0000 | [diff] [blame] | 124 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 125 | static void reportLocalLoadFailed(Frame*, const String& url); |
kmccullo | adfd67d | 2007-03-03 02:18:43 +0000 | [diff] [blame] | 126 | |
eric@webkit.org | 312451c | 2011-06-21 01:35:18 +0000 | [diff] [blame] | 127 | // FIXME: These are all functions which stop loads. We have too many. |
commit-queue@webkit.org | fc5833b | 2011-02-23 06:58:46 +0000 | [diff] [blame] | 128 | void stopAllLoaders(ClearProvisionalItemPolicy = ShouldClearProvisionalItem); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 129 | void stopForUserCancel(bool deferCheckLoadComplete = false); |
eric@webkit.org | 312451c | 2011-06-21 01:35:18 +0000 | [diff] [blame] | 130 | void stop(); |
| 131 | void stopLoading(UnloadEventPolicy); |
| 132 | bool closeURL(); |
| 133 | void cancelAndClear(); |
abarth@webkit.org | 23ea90a | 2012-08-14 19:47:59 +0000 | [diff] [blame] | 134 | // FIXME: clear() is trying to do too many things. We should break it down into smaller functions (ideally with fewer raw Boolean parameters). |
| 135 | void clear(Document* newDocument, bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true); |
ggaren | ec05502 | 2006-10-27 02:55:45 +0000 | [diff] [blame] | 136 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 137 | bool isLoading() const; |
| 138 | bool frameHasLoaded() const; |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 139 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 140 | int numPendingOrLoadingRequests(bool recurse) const; |
| 141 | String referrer() const; |
| 142 | String outgoingReferrer() const; |
| 143 | String outgoingOrigin() const; |
ggaren | b2497d8 | 2006-10-28 01:22:13 +0000 | [diff] [blame] | 144 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 145 | DocumentLoader* activeDocumentLoader() const; |
| 146 | DocumentLoader* documentLoader() const { return m_documentLoader.get(); } |
| 147 | DocumentLoader* policyDocumentLoader() const { return m_policyDocumentLoader.get(); } |
| 148 | DocumentLoader* provisionalDocumentLoader() const { return m_provisionalDocumentLoader.get(); } |
| 149 | FrameState state() const { return m_state; } |
| 150 | static double timeOfLastCompletedLoad(); |
mitz@apple.com | e8a753d | 2008-12-19 07:34:52 +0000 | [diff] [blame] | 151 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 152 | const ResourceRequest& originalRequest() const; |
| 153 | const ResourceRequest& initialRequest() const; |
japhet@chromium.org | 7f7bee4 | 2012-03-29 23:17:09 +0000 | [diff] [blame] | 154 | void receivedMainResourceError(const ResourceError&); |
andersca | 9291133 | 2006-12-15 04:04:29 +0000 | [diff] [blame] | 155 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 156 | bool willLoadMediaElementURL(KURL&); |
weinig@apple.com | 6893525 | 2009-10-07 02:48:12 +0000 | [diff] [blame] | 157 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 158 | void handleFallbackContent(); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 159 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 160 | ResourceError cancelledError(const ResourceRequest&) const; |
darin | fa7a4e3 | 2006-10-30 00:37:02 +0000 | [diff] [blame] | 161 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 162 | bool isHostedByObjectElement() const; |
| 163 | bool isLoadingMainFrame() const; |
darin | fa7a4e3 | 2006-10-30 00:37:02 +0000 | [diff] [blame] | 164 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 165 | bool isReplacing() const; |
| 166 | void setReplacing(); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 167 | bool subframeIsLoading() const; |
| 168 | void willChangeTitle(DocumentLoader*); |
| 169 | void didChangeTitle(DocumentLoader*); |
commit-queue@webkit.org | 343b8a6 | 2011-09-21 01:49:03 +0000 | [diff] [blame] | 170 | void didChangeIcons(IconType); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 171 | |
abarth@webkit.org | b2515fa | 2012-04-04 05:54:26 +0000 | [diff] [blame] | 172 | bool shouldTreatURLAsSrcdocDocument(const KURL&) const; |
| 173 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 174 | FrameLoadType loadType() const; |
tonyg@chromium.org | e86499a | 2010-07-09 20:16:03 +0000 | [diff] [blame] | 175 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 176 | CachePolicy subresourceCachePolicy() const; |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 177 | |
bdakin@apple.com | 0b27e9a | 2012-09-25 20:01:33 +0000 | [diff] [blame] | 178 | void didLayout(LayoutMilestones); |
bdakin@apple.com | e98caf1 | 2012-09-25 23:08:03 +0000 | [diff] [blame] | 179 | void didFirstLayout(); |
weinig@apple.com | 3cd020e | 2008-12-19 01:15:00 +0000 | [diff] [blame] | 180 | |
vsevik@chromium.org | 87bacd4 | 2011-07-14 16:59:11 +0000 | [diff] [blame] | 181 | void loadedResourceFromMemoryCache(CachedResource*); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 182 | void tellClientAboutPastMemoryCacheLoads(); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 183 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 184 | void checkLoadComplete(); |
| 185 | void detachFromParent(); |
| 186 | void detachViewsAndDocumentLoader(); |
darin | fa7a4e3 | 2006-10-30 00:37:02 +0000 | [diff] [blame] | 187 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 188 | void addExtraFieldsToSubresourceRequest(ResourceRequest&); |
| 189 | void addExtraFieldsToMainResourceRequest(ResourceRequest&); |
| 190 | |
tony@chromium.org | c1443b7 | 2011-06-24 22:05:16 +0000 | [diff] [blame] | 191 | static void addHTTPOriginIfNeeded(ResourceRequest&, const String& origin); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 192 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 193 | FrameLoaderClient* client() const { return m_client; } |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 194 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 195 | void setDefersLoading(bool); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 196 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 197 | void didExplicitOpen(); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 198 | |
abarth@webkit.org | 412c54e | 2010-04-20 22:12:16 +0000 | [diff] [blame] | 199 | // Callbacks from DocumentWriter |
| 200 | void didBeginDocument(bool dispatchWindowObjectAvailable); |
japhet@chromium.org | afe125f | 2012-04-30 18:51:27 +0000 | [diff] [blame] | 201 | |
| 202 | void receivedFirstData(); |
abarth@webkit.org | 412c54e | 2010-04-20 22:12:16 +0000 | [diff] [blame] | 203 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 204 | void handledOnloadEvents(); |
| 205 | String userAgent(const KURL&) const; |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 206 | |
aroben@apple.com | 11dd526 | 2009-11-13 23:49:05 +0000 | [diff] [blame] | 207 | void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*); |
aa@chromium.org | cfc4fa0 | 2009-11-14 03:11:06 +0000 | [diff] [blame] | 208 | void dispatchDidClearWindowObjectsInAllWorlds(); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 209 | void dispatchDocumentElementAvailable(); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 210 | |
eric@webkit.org | 0aceae7 | 2010-04-11 05:17:02 +0000 | [diff] [blame] | 211 | // The following sandbox flags will be forced, regardless of changes to |
| 212 | // the sandbox attribute of any parent frames. |
abarth@webkit.org | 8b45d86 | 2011-11-05 21:55:59 +0000 | [diff] [blame] | 213 | void forceSandboxFlags(SandboxFlags flags) { m_forcedSandboxFlags |= flags; } |
| 214 | SandboxFlags effectiveSandboxFlags() const; |
abarth@webkit.org | b8a1055 | 2009-12-02 02:40:35 +0000 | [diff] [blame] | 215 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 216 | // Mixed content related functions. |
| 217 | static bool isMixedContent(SecurityOrigin* context, const KURL&); |
commit-queue@webkit.org | 1fd144c | 2011-04-30 01:16:32 +0000 | [diff] [blame] | 218 | bool checkIfDisplayInsecureContent(SecurityOrigin* context, const KURL&); |
| 219 | bool checkIfRunInsecureContent(SecurityOrigin* context, const KURL&); |
abarth@webkit.org | 0f9b302 | 2009-09-11 05:48:06 +0000 | [diff] [blame] | 220 | |
commit-queue@webkit.org | 78e860e | 2012-08-16 12:42:09 +0000 | [diff] [blame] | 221 | bool checkIfFormActionAllowedByCSP(const KURL&) const; |
| 222 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 223 | Frame* opener(); |
| 224 | void setOpener(Frame*); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 225 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 226 | void resetMultipleFormSubmissionProtection(); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 227 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 228 | void checkCallImplicitClose(); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 229 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 230 | void frameDetached(); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 231 | |
japhet@chromium.org | b254c9b | 2011-01-26 19:14:26 +0000 | [diff] [blame] | 232 | void setOutgoingReferrer(const KURL&); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 233 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 234 | void loadDone(); |
| 235 | void finishedParsing(); |
| 236 | void checkCompleted(); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 237 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 238 | void checkDidPerformFirstNavigation(); |
abarth@webkit.org | 1c893f4 | 2009-10-10 02:27:21 +0000 | [diff] [blame] | 239 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 240 | bool isComplete() const; |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 241 | |
evan@chromium.org | c3532e9 | 2011-03-31 15:17:13 +0000 | [diff] [blame] | 242 | void setTitle(const StringWithDirection&); |
kmccullo | adfd67d | 2007-03-03 02:18:43 +0000 | [diff] [blame] | 243 | |
japhet@chromium.org | d48109c | 2010-06-04 17:41:26 +0000 | [diff] [blame] | 244 | void commitProvisionalLoad(); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 245 | |
japhet@chromium.org | 61d4b9c | 2010-06-21 20:06:02 +0000 | [diff] [blame] | 246 | FrameLoaderStateMachine* stateMachine() const { return &m_stateMachine; } |
mjs | f500eb7 | 2007-08-19 21:40:39 +0000 | [diff] [blame] | 247 | |
abarth@webkit.org | b46fdef | 2012-04-13 00:42:37 +0000 | [diff] [blame] | 248 | Frame* findFrameForNavigation(const AtomicString& name, Document* activeDocument = 0); |
weinig@apple.com | d57c107 | 2007-11-27 00:15:21 +0000 | [diff] [blame] | 249 | |
darin@apple.com | af8b1a9 | 2011-06-25 00:09:37 +0000 | [diff] [blame] | 250 | void applyUserAgent(ResourceRequest&); |
andersca@apple.com | 7b6613f | 2008-05-12 22:11:01 +0000 | [diff] [blame] | 251 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 252 | bool shouldInterruptLoadForXFrameOptions(const String&, const KURL&); |
weinig@apple.com | 5af461c | 2009-04-08 22:16:23 +0000 | [diff] [blame] | 253 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 254 | void completed(); |
| 255 | bool allAncestorsAreComplete() const; // including this |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 256 | void clientRedirected(const KURL&, double delay, double fireDate, bool lockBackForwardList); |
| 257 | void clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress); |
abarth@webkit.org | 43d36a3 | 2009-10-01 04:25:41 +0000 | [diff] [blame] | 258 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 259 | // FIXME: This is public because this asynchronous callback from the FrameLoaderClient |
| 260 | // uses the policy machinery (and therefore is called via the PolicyChecker). Once we |
| 261 | // introduce a proper callback type for this function, we should make it private again. |
| 262 | void continueLoadAfterWillSubmitForm(); |
ap@apple.com | 456d465 | 2011-11-30 12:13:31 +0000 | [diff] [blame] | 263 | |
| 264 | void setOriginalURLForDownloadRequest(ResourceRequest&); |
| 265 | |
japhet@chromium.org | 13b622e | 2009-10-20 18:17:01 +0000 | [diff] [blame] | 266 | bool suppressOpenerInNewFrame() const { return m_suppressOpenerInNewFrame; } |
abarth@webkit.org | 453854e | 2009-10-08 03:17:08 +0000 | [diff] [blame] | 267 | |
aestes@apple.com | 5e14373 | 2011-03-25 23:07:43 +0000 | [diff] [blame] | 268 | static ObjectContentType defaultObjectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages); |
staikos@webkit.org | c769212 | 2009-10-28 18:12:34 +0000 | [diff] [blame] | 269 | |
japhet@chromium.org | d48109c | 2010-06-04 17:41:26 +0000 | [diff] [blame] | 270 | bool quickRedirectComing() const { return m_quickRedirectComing; } |
| 271 | |
beidson@apple.com | 7617ce7 | 2010-05-13 20:31:46 +0000 | [diff] [blame] | 272 | bool shouldClose(); |
japhet@chromium.org | f102691 | 2010-06-21 22:33:49 +0000 | [diff] [blame] | 273 | |
| 274 | void started(); |
beidson@apple.com | 7617ce7 | 2010-05-13 20:31:46 +0000 | [diff] [blame] | 275 | |
commit-queue@webkit.org | 693f979 | 2011-06-30 21:46:50 +0000 | [diff] [blame] | 276 | enum PageDismissalType { |
| 277 | NoDismissal = 0, |
| 278 | BeforeUnloadDismissal = 1, |
| 279 | PageHideDismissal = 2, |
| 280 | UnloadDismissal = 3 |
| 281 | }; |
| 282 | PageDismissalType pageDismissalEventBeingDispatched() const { return m_pageDismissalEventBeingDispatched; } |
japhet@chromium.org | bc21302 | 2010-08-24 17:26:13 +0000 | [diff] [blame] | 283 | |
diegohcg@webkit.org | 993c6cf | 2010-09-11 07:54:15 +0000 | [diff] [blame] | 284 | NetworkingContext* networkingContext() const; |
diegohcg@webkit.org | 838e0a2 | 2010-09-04 14:48:30 +0000 | [diff] [blame] | 285 | |
loislo@chromium.org | 7f79cf8ee | 2012-07-18 05:58:49 +0000 | [diff] [blame] | 286 | void reportMemoryUsage(MemoryObjectInfo*) const; |
| 287 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 288 | private: |
darin@apple.com | af8b1a9 | 2011-06-25 00:09:37 +0000 | [diff] [blame] | 289 | bool allChildrenAreComplete() const; // immediate children, not all descendants |
| 290 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 291 | void checkTimerFired(Timer<FrameLoader>*); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 292 | |
mihaip@chromium.org | e5dbd37 | 2010-12-08 02:32:41 +0000 | [diff] [blame] | 293 | void loadSameDocumentItem(HistoryItem*); |
| 294 | void loadDifferentDocumentItem(HistoryItem*, FrameLoadType); |
beidson@apple.com | 08c6175 | 2009-12-03 19:04:40 +0000 | [diff] [blame] | 295 | |
japhet@chromium.org | d48109c | 2010-06-04 17:41:26 +0000 | [diff] [blame] | 296 | void loadProvisionalItemFromCachedPage(); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 297 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 298 | void updateFirstPartyForCookies(); |
| 299 | void setFirstPartyForCookies(const KURL&); |
| 300 | |
jochen@chromium.org | dac140c | 2011-08-01 21:18:49 +0000 | [diff] [blame] | 301 | void addExtraFieldsToRequest(ResourceRequest&, FrameLoadType, bool isMainResource); |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 302 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 303 | void clearProvisionalLoad(); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 304 | void transitionToCommitted(PassRefPtr<CachedPage>); |
| 305 | void frameLoadCompleted(); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 306 | |
abarth@webkit.org | b2515fa | 2012-04-04 05:54:26 +0000 | [diff] [blame] | 307 | SubstituteData defaultSubstituteDataForURL(const KURL&); |
| 308 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 309 | static void callContinueLoadAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue); |
weinig@apple.com | 140e06f | 2010-10-22 20:59:02 +0000 | [diff] [blame] | 310 | static void callContinueLoadAfterNewWindowPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 311 | static void callContinueFragmentScrollAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue); |
rniwa@webkit.org | cf46007 | 2011-01-08 02:15:10 +0000 | [diff] [blame] | 312 | |
| 313 | bool fireBeforeUnloadEvent(Chrome*); |
abarth@webkit.org | 453854e | 2009-10-08 03:17:08 +0000 | [diff] [blame] | 314 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 315 | void continueLoadAfterNavigationPolicy(const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue); |
weinig@apple.com | 140e06f | 2010-10-22 20:59:02 +0000 | [diff] [blame] | 316 | void continueLoadAfterNewWindowPolicy(const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 317 | void continueFragmentScrollAfterNavigationPolicy(const ResourceRequest&, bool shouldContinue); |
abarth@webkit.org | 453854e | 2009-10-08 03:17:08 +0000 | [diff] [blame] | 318 | |
tsepez@chromium.org | f896056 | 2012-04-06 22:15:02 +0000 | [diff] [blame] | 319 | bool shouldPerformFragmentNavigation(bool isFormSubmission, const String& httpMethod, FrameLoadType, const KURL&); |
tsepez@chromium.org | 8d3c2c1 | 2012-04-17 19:03:42 +0000 | [diff] [blame] | 320 | void scrollToFragmentWithParentBoundary(const KURL&); |
darin | e4d34c6 | 2006-10-29 06:48:02 +0000 | [diff] [blame] | 321 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 322 | void checkLoadCompleteForThisFrame(); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 323 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 324 | void setDocumentLoader(DocumentLoader*); |
| 325 | void setPolicyDocumentLoader(DocumentLoader*); |
| 326 | void setProvisionalDocumentLoader(DocumentLoader*); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 327 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 328 | void setState(FrameState); |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 329 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 330 | void closeOldDataSources(); |
japhet@chromium.org | d48109c | 2010-06-04 17:41:26 +0000 | [diff] [blame] | 331 | void prepareForCachedPageRestore(); |
beidson@apple.com | 028c7a7 | 2009-02-11 22:01:22 +0000 | [diff] [blame] | 332 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 333 | bool shouldReloadToHandleUnreachableURL(DocumentLoader*); |
darin | 7c9aa2d | 2006-11-05 01:06:47 +0000 | [diff] [blame] | 334 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 335 | void dispatchDidCommitLoad(); |
aroben | dfc5666 | 2007-06-21 01:37:24 +0000 | [diff] [blame] | 336 | |
jochen@chromium.org | 46be537 | 2011-11-15 23:52:28 +0000 | [diff] [blame] | 337 | void urlSelected(const FrameLoadRequest&, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, ShouldSendReferrer, ShouldReplaceDocumentIfJavaScriptURL); |
cjerdonek@webkit.org | 983777f | 2010-05-17 07:34:12 +0000 | [diff] [blame] | 338 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 339 | void loadWithDocumentLoader(DocumentLoader*, FrameLoadType, PassRefPtr<FormState>); // Calls continueLoadAfterNavigationPolicy |
| 340 | void load(DocumentLoader*); // Calls loadWithDocumentLoader |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 341 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 342 | void loadWithNavigationAction(const ResourceRequest&, const NavigationAction&, // Calls loadWithDocumentLoader |
| 343 | bool lockHistory, FrameLoadType, PassRefPtr<FormState>); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 344 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 345 | void loadPostRequest(const ResourceRequest&, const String& referrer, // Called by loadFrameRequest, calls loadWithNavigationAction |
| 346 | const String& frameName, bool lockHistory, FrameLoadType, PassRefPtr<Event>, PassRefPtr<FormState>); |
| 347 | void loadURL(const KURL&, const String& referrer, const String& frameName, // Called by loadFrameRequest, calls loadWithNavigationAction or dispatches to navigation policy delegate |
| 348 | bool lockHistory, FrameLoadType, PassRefPtr<Event>, PassRefPtr<FormState>); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 349 | |
commit-queue@webkit.org | 2090e27 | 2012-06-28 16:05:43 +0000 | [diff] [blame] | 350 | void reloadWithRequest(const ResourceRequest&, bool endToEndReload); |
| 351 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 352 | bool shouldReload(const KURL& currentURL, const KURL& destinationURL); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 353 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 354 | void requestFromDelegate(ResourceRequest&, unsigned long& identifier, ResourceError&); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 355 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 356 | void detachChildren(); |
| 357 | void closeAndRemoveChild(Frame*); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 358 | |
beidson@apple.com | 08c6175 | 2009-12-03 19:04:40 +0000 | [diff] [blame] | 359 | void loadInSameDocument(const KURL&, SerializedScriptValue* stateObject, bool isNewNavigation); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 360 | |
japhet@chromium.org | 91e5e2f | 2012-04-02 22:08:19 +0000 | [diff] [blame] | 361 | void prepareForLoadStart(); |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 362 | void provisionalLoadStarted(); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 363 | |
abarth@webkit.org | 55d49da | 2011-06-20 23:32:54 +0000 | [diff] [blame] | 364 | bool didOpenURL(); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 365 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 366 | void scheduleCheckCompleted(); |
| 367 | void scheduleCheckLoadComplete(); |
| 368 | void startCheckCompleteTimer(); |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 369 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 370 | bool shouldTreatURLAsSameAsCurrent(const KURL&) const; |
darin@apple.com | 4cd1b24 | 2009-03-27 23:37:46 +0000 | [diff] [blame] | 371 | |
beidson@apple.com | 2a75a96 | 2012-04-24 18:12:55 +0000 | [diff] [blame] | 372 | void dispatchGlobalObjectAvailableInAllWorlds(); |
| 373 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 374 | Frame* m_frame; |
| 375 | FrameLoaderClient* m_client; |
darin | 7095f0f | 2006-10-26 05:04:54 +0000 | [diff] [blame] | 376 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 377 | mutable PolicyChecker m_policyChecker; |
| 378 | mutable HistoryController m_history; |
| 379 | mutable ResourceLoadNotifier m_notifer; |
japhet@chromium.org | f102691 | 2010-06-21 22:33:49 +0000 | [diff] [blame] | 380 | mutable SubframeLoader m_subframeLoader; |
japhet@chromium.org | 61d4b9c | 2010-06-21 20:06:02 +0000 | [diff] [blame] | 381 | mutable FrameLoaderStateMachine m_stateMachine; |
abarth@webkit.org | 4e00997 | 2011-06-13 20:36:03 +0000 | [diff] [blame] | 382 | mutable IconController m_icon; |
abarth@webkit.org | 453854e | 2009-10-08 03:17:08 +0000 | [diff] [blame] | 383 | |
japhet@chromium.org | 7879dd7 | 2012-08-30 02:58:37 +0000 | [diff] [blame] | 384 | class FrameProgressTracker; |
| 385 | OwnPtr<FrameProgressTracker> m_progressTracker; |
| 386 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 387 | FrameState m_state; |
| 388 | FrameLoadType m_loadType; |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 389 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 390 | // Document loaders for the three phases of frame loading. Note that while |
| 391 | // a new request is being loaded, the old document loader may still be referenced. |
| 392 | // E.g. while a new request is in the "policy" state, the old document loader may |
| 393 | // be consulted in particular as it makes sense to imply certain settings on the new loader. |
| 394 | RefPtr<DocumentLoader> m_documentLoader; |
| 395 | RefPtr<DocumentLoader> m_provisionalDocumentLoader; |
| 396 | RefPtr<DocumentLoader> m_policyDocumentLoader; |
mjs | 434a4ff | 2006-10-10 02:41:03 +0000 | [diff] [blame] | 397 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 398 | bool m_delegateIsHandlingProvisionalLoadError; |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 399 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 400 | bool m_quickRedirectComing; |
| 401 | bool m_sentRedirectNotification; |
| 402 | bool m_inStopAllLoaders; |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 403 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 404 | String m_outgoingReferrer; |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 405 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 406 | bool m_isExecutingJavaScriptFormAction; |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 407 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 408 | bool m_didCallImplicitClose; |
| 409 | bool m_wasUnloadEventEmitted; |
commit-queue@webkit.org | 693f979 | 2011-06-30 21:46:50 +0000 | [diff] [blame] | 410 | PageDismissalType m_pageDismissalEventBeingDispatched; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 411 | bool m_isComplete; |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 412 | |
beidson@apple.com | 3d8c77b | 2010-01-16 19:18:14 +0000 | [diff] [blame] | 413 | RefPtr<SerializedScriptValue> m_pendingStateObject; |
| 414 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 415 | bool m_needsClear; |
abarth@webkit.org | 91289c3 | 2010-04-12 04:54:55 +0000 | [diff] [blame] | 416 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 417 | KURL m_submittedFormURL; |
abarth@webkit.org | 43d36a3 | 2009-10-01 04:25:41 +0000 | [diff] [blame] | 418 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 419 | Timer<FrameLoader> m_checkTimer; |
| 420 | bool m_shouldCallCheckCompleted; |
| 421 | bool m_shouldCallCheckLoadComplete; |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 422 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 423 | Frame* m_opener; |
| 424 | HashSet<Frame*> m_openedFrames; |
darin | c370e7e | 2006-11-08 05:52:27 +0000 | [diff] [blame] | 425 | |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 426 | bool m_didPerformFirstNavigation; |
| 427 | bool m_loadingFromCachedPage; |
japhet@chromium.org | 3ded963 | 2009-10-19 21:15:06 +0000 | [diff] [blame] | 428 | bool m_suppressOpenerInNewFrame; |
simonjam@chromium.org | 92bc9b0 | 2011-01-06 02:41:13 +0000 | [diff] [blame] | 429 | |
abarth@webkit.org | f2c54c2 | 2010-04-11 06:57:13 +0000 | [diff] [blame] | 430 | SandboxFlags m_forcedSandboxFlags; |
abarth@webkit.org | b8a1055 | 2009-12-02 02:40:35 +0000 | [diff] [blame] | 431 | |
diegohcg@webkit.org | 838e0a2 | 2010-09-04 14:48:30 +0000 | [diff] [blame] | 432 | RefPtr<FrameNetworkingContext> m_networkingContext; |
simonjam@chromium.org | 92bc9b0 | 2011-01-06 02:41:13 +0000 | [diff] [blame] | 433 | |
| 434 | KURL m_previousUrl; |
tkent@chromium.org | 93d9290 | 2012-03-02 02:29:59 +0000 | [diff] [blame] | 435 | RefPtr<HistoryItem> m_requestedHistoryItem; |
eric@webkit.org | e133cb1 | 2009-10-16 23:44:48 +0000 | [diff] [blame] | 436 | }; |
darin | 95e399c | 2006-10-24 03:28:02 +0000 | [diff] [blame] | 437 | |
cjerdonek@webkit.org | e1d4541 | 2010-08-11 17:40:23 +0000 | [diff] [blame] | 438 | // This function is called by createWindow() in JSDOMWindowBase.cpp, for example, for |
| 439 | // modal dialog creation. The lookupFrame is for looking up the frame name in case |
| 440 | // the frame name references a frame different from the openerFrame, e.g. when it is |
| 441 | // "_self" or "_parent". |
| 442 | // |
| 443 | // FIXME: Consider making this function part of an appropriate class (not FrameLoader) |
| 444 | // and moving it to a more appropriate location. |
| 445 | Frame* createWindow(Frame* openerFrame, Frame* lookupFrame, const FrameLoadRequest&, const WindowFeatures&, bool& created); |
| 446 | |
weinig@apple.com | 42c22db | 2009-03-04 21:53:36 +0000 | [diff] [blame] | 447 | } // namespace WebCore |
andersca | 799c716 | 2006-11-10 19:16:18 +0000 | [diff] [blame] | 448 | |
weinig@apple.com | 42c22db | 2009-03-04 21:53:36 +0000 | [diff] [blame] | 449 | #endif // FrameLoader_h |