| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // FIXME: This is not cool, people. We should aim to consolidate these v
ariety of loading related methods into a smaller set, | 130 // FIXME: This is not cool, people. We should aim to consolidate these v
ariety of loading related methods into a smaller set, |
| 131 // and try to reuse more of the same logic by extracting common code pat
hs. | 131 // and try to reuse more of the same logic by extracting common code pat
hs. |
| 132 void prepareForLoadStart(); | 132 void prepareForLoadStart(); |
| 133 void setupForReplace(); | 133 void setupForReplace(); |
| 134 void setupForReplaceByMIMEType(const String& newMIMEType); | 134 void setupForReplaceByMIMEType(const String& newMIMEType); |
| 135 | 135 |
| 136 void loadWithDocumentLoader(DocumentLoader*, FrameLoadType, PassRefPtr<F
ormState>); // Calls continueLoadAfterNavigationPolicy | 136 void loadWithDocumentLoader(DocumentLoader*, FrameLoadType, PassRefPtr<F
ormState>); // Calls continueLoadAfterNavigationPolicy |
| 137 void load(DocumentLoader*);
// Calls loadWithDocumentLoader | 137 void load(DocumentLoader*);
// Calls loadWithDocumentLoader |
| 138 | 138 |
| 139 void loadWithNavigationAction(const ResourceRequest&, const NavigationAc
tion&, // Calls loadWithDocumentLoader() | 139 void loadWithNavigationAction(const ResourceRequest&, const NavigationAc
tion&, // Calls loadWithDocumentLoader() |
| 140 FrameLoadType, PassRefPtr<FormState>); | 140 bool lockHistory, FrameLoadType, PassRefPtr<FormState>); |
| 141 | 141 |
| 142 void loadPostRequest(const ResourceRequest&, const String& referrer,
// Called by loadFrameRequestWithFormAndValues(), calls load
WithNavigationAction | 142 void loadPostRequest(const ResourceRequest&, const String& referrer,
// Called by loadFrameRequestWithFormAndValues(), calls load
WithNavigationAction |
| 143 const String& frameName, FrameLoadType, Event*, PassRefPtr<FormState
>); | 143 const String& frameName, bool lockHistory, FrameLoadType, Event*, Pa
ssRefPtr<FormState>); |
| 144 | 144 |
| 145 void loadURL(const KURL& newURL, const String& referrer, const String& f
rameName, // Called by loadFrameRequestWithFormAndValues(), calls load
WithNavigationAction or else dispatches to navigation policy delegate | 145 void loadURL(const KURL& newURL, const String& referrer, const String& f
rameName, // Called by loadFrameRequestWithFormAndValues(), calls load
WithNavigationAction or else dispatches to navigation policy delegate |
| 146 FrameLoadType, Event*, PassRefPtr<FormState>);
| 146 bool lockHistory, FrameLoadType, Event*, PassRefPtr<FormState>);
|
| 147 void loadURLIntoChildFrame(const KURL&, const String& referer, Frame*); | 147 void loadURLIntoChildFrame(const KURL&, const String& referer, Frame*); |
| 148 | 148 |
| 149 void loadFrameRequestWithFormAndValues(const FrameLoadRequest&, bool loc
kHistory, bool lockBackForwardList, // Called by submitForm, calls loa
dPostRequest() | 149 void loadFrameRequestWithFormAndValues(const FrameLoadRequest&, bool loc
kHistory, bool lockBackForwardList, // Called by submitForm, calls loa
dPostRequest() |
| 150 Event*, HTMLFormElement*, const HashMap<String, String>& formValues)
; | 150 Event*, HTMLFormElement*, const HashMap<String, String>& formValues)
; |
| 151 | 151 |
| 152 void load(const ResourceRequest&);
// Called by WebFrame, calls (ResourceRequest, SubstituteDat
a) | 152 void load(const ResourceRequest&, bool lockHistory);
// Called by WebFrame, calls (ResourceRequ
est, SubstituteData) |
| 153 void load(const ResourceRequest&, const SubstituteData&);
// Called both by WebFrame and internally, calls (DocumentLo
ader*) | 153 void load(const ResourceRequest&, const SubstituteData&, bool lockHistor
y); // Called both by WebFrame and internally,
calls (DocumentLoader*) |
| 154 void load(const ResourceRequest&, const String& frameName);
// Called by WebPluginController | 154 void load(const ResourceRequest&, const String& frameName, bool lockHist
ory); // Called by WebPluginController |
| 155 | 155 |
| 156 void loadArchive(PassRefPtr<Archive> archive); | 156 void loadArchive(PassRefPtr<Archive> archive); |
| 157 | 157 |
| 158 // Returns true for any non-local URL. If Document parameter is supplied
, its local load policy dictates, | 158 // Returns true for any non-local URL. If Document parameter is supplied
, its local load policy dictates, |
| 159 // otherwise if referrer is non-empty and represents a local file, then
the local load is allowed. | 159 // otherwise if referrer is non-empty and represents a local file, then
the local load is allowed. |
| 160 static bool canLoad(const KURL&, const String& referrer, const Document*
theDocument = 0); | 160 static bool canLoad(const KURL&, const String& referrer, const Document*
theDocument = 0); |
| 161 static void reportLocalLoadFailed(Frame*, const String& url); | 161 static void reportLocalLoadFailed(Frame*, const String& url); |
| 162 | 162 |
| 163 static bool shouldHideReferrer(const KURL& url, const String& referrer); | 163 static bool shouldHideReferrer(const KURL& url, const String& referrer); |
| 164 | 164 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 | 247 |
| 248 FrameLoadType loadType() const; | 248 FrameLoadType loadType() const; |
| 249 CachePolicy cachePolicy() const; | 249 CachePolicy cachePolicy() const; |
| 250 | 250 |
| 251 void didFirstLayout(); | 251 void didFirstLayout(); |
| 252 bool firstLayoutDone() const; | 252 bool firstLayoutDone() const; |
| 253 | 253 |
| 254 void didFirstVisuallyNonEmptyLayout(); | 254 void didFirstVisuallyNonEmptyLayout(); |
| 255 | 255 |
| 256 void clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress); | 256 void clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress); |
| 257 void clientRedirected(const KURL&, double delay, double fireDate, bool l
ockHistory, bool lockBackForwardList, bool isJavaScriptFormAction); | 257 void clientRedirected(const KURL&, double delay, double fireDate, bool l
ockBackForwardList, bool isJavaScriptFormAction); |
| 258 bool shouldReload(const KURL& currentURL, const KURL& destinationURL); | 258 bool shouldReload(const KURL& currentURL, const KURL& destinationURL); |
| 259 #if ENABLE(WML) | 259 #if ENABLE(WML) |
| 260 void setForceReloadWmlDeck(bool); | 260 void setForceReloadWmlDeck(bool); |
| 261 #endif | 261 #endif |
| 262 | 262 |
| 263 bool isQuickRedirectComing() const; | 263 bool isQuickRedirectComing() const; |
| 264 | 264 |
| 265 void sendRemainingDelegateMessages(unsigned long identifier, const Resou
rceResponse&, int length, const ResourceError&); | 265 void sendRemainingDelegateMessages(unsigned long identifier, const Resou
rceResponse&, int length, const ResourceError&); |
| 266 void requestFromDelegate(ResourceRequest&, unsigned long& identifier, Re
sourceError&); | 266 void requestFromDelegate(ResourceRequest&, unsigned long& identifier, Re
sourceError&); |
| 267 void loadedResourceFromMemoryCache(const CachedResource*); | 267 void loadedResourceFromMemoryCache(const CachedResource*); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 void saveDocumentState(); | 472 void saveDocumentState(); |
| 473 void loadItem(HistoryItem*, FrameLoadType); | 473 void loadItem(HistoryItem*, FrameLoadType); |
| 474 bool urlsMatchItem(HistoryItem*) const; | 474 bool urlsMatchItem(HistoryItem*) const; |
| 475 void invalidateCurrentItemCachedPage(); | 475 void invalidateCurrentItemCachedPage(); |
| 476 void recursiveGoToItem(HistoryItem*, HistoryItem*, FrameLoadType); | 476 void recursiveGoToItem(HistoryItem*, HistoryItem*, FrameLoadType); |
| 477 bool childFramesMatchItem(HistoryItem*) const; | 477 bool childFramesMatchItem(HistoryItem*) const; |
| 478 | 478 |
| 479 void updateHistoryForBackForwardNavigation(); | 479 void updateHistoryForBackForwardNavigation(); |
| 480 void updateHistoryForReload(); | 480 void updateHistoryForReload(); |
| 481 void updateHistoryForStandardLoad(); | 481 void updateHistoryForStandardLoad(); |
| 482 void updateHistoryForRedirectWithLockedHistory(); | 482 void updateHistoryForRedirectWithLockedBackForwardList(); |
| 483 void updateHistoryForClientRedirect(); | 483 void updateHistoryForClientRedirect(); |
| 484 void updateHistoryForCommit(); | 484 void updateHistoryForCommit(); |
| 485 void updateHistoryForAnchorScroll(); | 485 void updateHistoryForAnchorScroll(); |
| 486 | 486 |
| 487 void redirectionTimerFired(Timer<FrameLoader>*); | 487 void redirectionTimerFired(Timer<FrameLoader>*); |
| 488 void checkCompletedTimerFired(Timer<FrameLoader>*); | 488 void checkCompletedTimerFired(Timer<FrameLoader>*); |
| 489 void checkLoadCompleteTimerFired(Timer<FrameLoader>*); | 489 void checkLoadCompleteTimerFired(Timer<FrameLoader>*); |
| 490 | 490 |
| 491 void cancelRedirection(bool newLoadInProgress = false); | 491 void cancelRedirection(bool newLoadInProgress = false); |
| 492 | 492 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 #endif | 690 #endif |
| 691 | 691 |
| 692 #if ENABLE(WML) | 692 #if ENABLE(WML) |
| 693 bool m_forceReloadWmlDeck; | 693 bool m_forceReloadWmlDeck; |
| 694 #endif | 694 #endif |
| 695 }; | 695 }; |
| 696 | 696 |
| 697 } | 697 } |
| 698 | 698 |
| 699 #endif | 699 #endif |
| OLD | NEW |