2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
15 * its contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #include "CachePolicy.h"
34 #include "FrameLoaderTypes.h"
35 #include "ResourceRequest.h"
38 #if USE(LOW_BANDWIDTH_DISPLAY)
39 #include "CachedResourceClient.h"
45 class AuthenticationChallenge
;
55 class FrameLoaderClient
;
57 class HTMLFormElement
;
58 class HTMLFrameOwnerElement
;
61 class NavigationAction
;
62 class ProtectionSpace
;
66 class ResourceResponse
;
67 class ScriptSourceCode
;
72 class TextResourceDecoder
;
75 struct FrameLoadRequest
;
76 struct ScheduledRedirection
;
77 struct WindowFeatures
;
79 bool isBackForwardLoadType(FrameLoadType
);
81 typedef void (*NavigationPolicyDecisionFunction
)(void* argument
,
82 const ResourceRequest
&, PassRefPtr
<FormState
>, bool shouldContinue
);
83 typedef void (*NewWindowPolicyDecisionFunction
)(void* argument
,
84 const ResourceRequest
&, PassRefPtr
<FormState
>, const String
& frameName
, bool shouldContinue
);
85 typedef void (*ContentPolicyDecisionFunction
)(void* argument
, PolicyAction
);
92 void set(const ResourceRequest
&, PassRefPtr
<FormState
>,
93 NavigationPolicyDecisionFunction
, void* argument
);
94 void set(const ResourceRequest
&, PassRefPtr
<FormState
>, const String
& frameName
,
95 NewWindowPolicyDecisionFunction
, void* argument
);
96 void set(ContentPolicyDecisionFunction
, void* argument
);
98 const ResourceRequest
& request() const { return m_request
; }
101 void call(bool shouldContinue
);
102 void call(PolicyAction
);
106 ResourceRequest m_request
;
107 RefPtr
<FormState
> m_formState
;
110 NavigationPolicyDecisionFunction m_navigationFunction
;
111 NewWindowPolicyDecisionFunction m_newWindowFunction
;
112 ContentPolicyDecisionFunction m_contentFunction
;
116 class FrameLoader
: Noncopyable
117 #if USE(LOW_BANDWIDTH_DISPLAY)
118 , private CachedResourceClient
122 FrameLoader(Frame
*, FrameLoaderClient
*);
123 virtual ~FrameLoader();
126 void initForSynthesizedDocument(const KURL
& url
);
128 Frame
* frame() const { return m_frame
; }
130 // FIXME: This is not cool, people. There are too many different functions that all start loads.
131 // We should aim to consolidate these into a smaller set of functions, and try to reuse more of
132 // the logic by extracting common code paths.
134 void prepareForLoadStart();
135 void setupForReplace();
136 void setupForReplaceByMIMEType(const String
& newMIMEType
);
138 void loadURLIntoChildFrame(const KURL
&, const String
& referer
, Frame
*);
140 void loadFrameRequest(const FrameLoadRequest
&, bool lockHistory
, bool lockBackForwardList
, // Called by submitForm, calls loadPostRequest()
141 bool userGesture
, PassRefPtr
<Event
>, PassRefPtr
<FormState
>);
143 void load(const ResourceRequest
&, bool lockHistory
); // Called by WebFrame, calls load(ResourceRequest, SubstituteData).
144 void load(const ResourceRequest
&, const SubstituteData
&, bool lockHistory
); // Called both by WebFrame and internally, calls load(DocumentLoader*).
145 void load(const ResourceRequest
&, const String
& frameName
, bool lockHistory
); // Called by WebPluginController.
147 void loadArchive(PassRefPtr
<Archive
>);
149 // Returns true for any non-local URL. If document parameter is supplied, its local load policy dictates,
150 // otherwise if referrer is non-empty and represents a local file, then the local load is allowed.
151 static bool canLoad(const KURL
&, const String
& referrer
, const Document
* = 0);
152 static void reportLocalLoadFailed(Frame
*, const String
& url
);
154 static bool shouldHideReferrer(const KURL
&, const String
& referrer
);
156 Frame
* createWindow(FrameLoader
* frameLoaderForFrameLookup
, const FrameLoadRequest
&, const WindowFeatures
&, bool& created
, bool userGesture
);
158 unsigned long loadResourceSynchronously(const ResourceRequest
&, ResourceError
&, ResourceResponse
&, Vector
<char>& data
);
160 bool canHandleRequest(const ResourceRequest
&);
163 void stopAllLoaders();
164 void stopForUserCancel(bool deferCheckLoadComplete
= false);
166 bool isLoadingMainResource() const { return m_isLoadingMainResource
; }
167 bool isLoading() const;
168 bool frameHasLoaded() const;
170 int numPendingOrLoadingRequests(bool recurse
) const;
171 String
referrer() const;
172 String
outgoingReferrer() const;
173 String
outgoingOrigin() const;
175 DocumentLoader
* activeDocumentLoader() const;
176 DocumentLoader
* documentLoader() const;
177 DocumentLoader
* provisionalDocumentLoader() const;
178 FrameState
state() const;
179 static double timeOfLastCompletedLoad();
181 bool shouldUseCredentialStorage(ResourceLoader
*);
182 void didReceiveAuthenticationChallenge(ResourceLoader
*, const AuthenticationChallenge
&);
183 void didCancelAuthenticationChallenge(ResourceLoader
*, const AuthenticationChallenge
&);
185 bool canAuthenticateAgainstProtectionSpace(ResourceLoader
*, const ProtectionSpace
&);
187 void assignIdentifierToInitialRequest(unsigned long identifier
, const ResourceRequest
&);
188 void willSendRequest(ResourceLoader
*, ResourceRequest
&, const ResourceResponse
& redirectResponse
);
189 void didReceiveResponse(ResourceLoader
*, const ResourceResponse
&);
190 void didReceiveData(ResourceLoader
*, const char*, int, int lengthReceived
);
191 void didFinishLoad(ResourceLoader
*);
192 void didFailToLoad(ResourceLoader
*, const ResourceError
&);
193 const ResourceRequest
& originalRequest() const;
194 const ResourceRequest
& initialRequest() const;
195 void receivedMainResourceError(const ResourceError
&, bool isComplete
);
196 void receivedData(const char*, int);
198 void handleFallbackContent();
199 bool isStopping() const;
201 void finishedLoading();
203 ResourceError
cancelledError(const ResourceRequest
&) const;
204 ResourceError
fileDoesNotExistError(const ResourceResponse
&) const;
205 ResourceError
blockedError(const ResourceRequest
&) const;
206 ResourceError
cannotShowURLError(const ResourceRequest
&) const;
208 void cannotShowMIMEType(const ResourceResponse
&);
209 ResourceError
interruptionForPolicyChangeError(const ResourceRequest
&);
211 bool isHostedByObjectElement() const;
212 bool isLoadingMainFrame() const;
213 bool canShowMIMEType(const String
& MIMEType
) const;
214 bool representationExistsForURLScheme(const String
& URLScheme
);
215 String
generatedMIMETypeForURLScheme(const String
& URLScheme
);
217 void checkNavigationPolicy(const ResourceRequest
&, NavigationPolicyDecisionFunction function
, void* argument
);
218 void checkContentPolicy(const String
& MIMEType
, ContentPolicyDecisionFunction
, void* argument
);
219 void cancelContentPolicyCheck();
221 void reload(bool endToEndReload
= false);
222 void reloadWithOverrideEncoding(const String
& overrideEncoding
);
224 void didReceiveServerRedirectForProvisionalLoadForFrame();
225 void finishedLoadingDocument(DocumentLoader
*);
226 void committedLoad(DocumentLoader
*, const char*, int);
227 bool isReplacing() const;
229 void revertToProvisional(DocumentLoader
*);
230 void setMainDocumentError(DocumentLoader
*, const ResourceError
&);
231 void mainReceivedCompleteError(DocumentLoader
*, const ResourceError
&);
232 bool subframeIsLoading() const;
233 void willChangeTitle(DocumentLoader
*);
234 void didChangeTitle(DocumentLoader
*);
236 FrameLoadType
loadType() const;
237 CachePolicy
cachePolicy() const;
239 void didFirstLayout();
240 bool firstLayoutDone() const;
242 void didFirstVisuallyNonEmptyLayout();
245 void setForceReloadWmlDeck(bool);
248 void loadedResourceFromMemoryCache(const CachedResource
*);
249 void tellClientAboutPastMemoryCacheLoads();
251 void checkLoadComplete();
252 void detachFromParent();
254 void addExtraFieldsToSubresourceRequest(ResourceRequest
&);
255 void addExtraFieldsToMainResourceRequest(ResourceRequest
&);
257 static void addHTTPOriginIfNeeded(ResourceRequest
&, String origin
);
259 FrameLoaderClient
* client() const { return m_client
; }
261 void setDefersLoading(bool);
263 void changeLocation(const KURL
&, const String
& referrer
, bool lockHistory
= true, bool lockBackForwardList
= true, bool userGesture
= false, bool refresh
= false);
264 void urlSelected(const ResourceRequest
&, const String
& target
, PassRefPtr
<Event
>, bool lockHistory
, bool lockBackForwardList
, bool userGesture
);
265 bool requestFrame(HTMLFrameOwnerElement
*, const String
& url
, const AtomicString
& frameName
);
267 void submitForm(const char* action
, const String
& url
,
268 PassRefPtr
<FormData
>, const String
& target
, const String
& contentType
, const String
& boundary
,
269 bool lockHistory
, bool lockBackForwardList
, PassRefPtr
<Event
>, PassRefPtr
<FormState
>);
272 void stopLoading(bool sendUnload
);
274 void didExplicitOpen();
277 void commitIconURLToIconDatabase(const KURL
&);
279 KURL
baseURL() const;
281 bool isScheduledLocationChangePending() const { return m_scheduledRedirection
&& isLocationChange(*m_scheduledRedirection
); }
282 void scheduleHTTPRedirection(double delay
, const String
& url
);
283 void scheduleLocationChange(const String
& url
, const String
& referrer
, bool lockHistory
= true, bool lockBackForwardList
= true, bool userGesture
= false);
284 void scheduleRefresh(bool userGesture
= false);
285 void scheduleHistoryNavigation(int steps
);
287 bool canGoBackOrForward(int distance
) const;
288 void goBackOrForward(int distance
);
289 int getHistoryLength();
292 void begin(const KURL
&, bool dispatchWindowObjectAvailable
= true, SecurityOrigin
* forcedSecurityOrigin
= 0);
294 void write(const char* string
, int length
= -1, bool flush
= false);
295 void write(const String
&);
297 void endIfNotLoadingMainResource();
299 void setEncoding(const String
& encoding
, bool userChosen
);
300 String
encoding() const;
302 ScriptValue
executeScript(const ScriptSourceCode
&);
303 ScriptValue
executeScript(const String
& script
, bool forceUserGesture
= false);
307 void tokenizerProcessedData();
309 void handledOnloadEvents();
310 String
userAgent(const KURL
&) const;
312 Widget
* createJavaAppletWidget(const IntSize
&, Element
*, const HashMap
<String
, String
>& args
);
314 void dispatchWindowObjectAvailable();
315 void restoreDocumentState();
318 void setOpener(Frame
*);
319 bool openedByDOM() const;
320 void setOpenedByDOM();
322 bool userGestureHint();
324 void resetMultipleFormSubmissionProtection();
326 void addData(const char* bytes
, int length
);
328 void checkCallImplicitClose();
330 void frameDetached();
332 const KURL
& url() const { return m_URL
; }
334 void setResponseMIMEType(const String
&);
335 const String
& responseMIMEType() const;
337 bool containsPlugins() const;
340 void finishedParsing();
341 void checkCompleted();
343 bool isComplete() const;
345 bool requestObject(RenderPart
* frame
, const String
& url
, const AtomicString
& frameName
,
346 const String
& serviceType
, const Vector
<String
>& paramNames
, const Vector
<String
>& paramValues
);
348 KURL
completeURL(const String
& url
);
350 void cancelAndClear();
352 void setTitle(const String
&);
354 void commitProvisionalLoad(PassRefPtr
<CachedPage
>);
356 void goToItem(HistoryItem
*, FrameLoadType
);
357 void saveDocumentAndScrollState();
359 HistoryItem
* currentHistoryItem();
360 HistoryItem
* previousHistoryItem();
361 HistoryItem
* provisionalHistoryItem();
362 void setPreviousHistoryItem(PassRefPtr
<HistoryItem
>);
364 enum LocalLoadPolicy
{
365 AllowLocalLoadsForAll
, // No restriction on local loads.
366 AllowLocalLoadsForLocalAndSubstituteData
,
367 AllowLocalLoadsForLocalOnly
,
369 static void setLocalLoadPolicy(LocalLoadPolicy
);
370 static bool restrictAccessToLocal();
371 static bool allowSubstituteDataAccessToLocal();
373 static void registerURLSchemeAsLocal(const String
& scheme
);
374 static bool shouldTreatURLAsLocal(const String
&);
375 static bool shouldTreatSchemeAsLocal(const String
&);
377 #if USE(LOW_BANDWIDTH_DISPLAY)
378 bool addLowBandwidthDisplayRequest(CachedResource
*);
379 void needToSwitchOutLowBandwidthDisplay() { m_needToSwitchOutLowBandwidthDisplay
= true; }
381 // Client can control whether to use low bandwidth display on a per frame basis.
382 // However, this should only be used for the top frame, not sub-frame.
383 void setUseLowBandwidthDisplay(bool lowBandwidth
) { m_useLowBandwidthDisplay
= lowBandwidth
; }
384 bool useLowBandwidthDisplay() const { return m_useLowBandwidthDisplay
; }
386 void setLoadsSynchronously(bool loadsSynchronously
) { m_loadsSynchronously
= loadsSynchronously
; }
387 bool loadsSynchronously() { return m_loadsSynchronously
; }
389 bool committingFirstRealLoad() const { return !m_creatingInitialEmptyDocument
&& !m_committedFirstRealDocumentLoad
; }
391 void iconLoadDecisionAvailable();
393 bool shouldAllowNavigation(Frame
* targetFrame
) const;
394 Frame
* findFrameForNavigation(const AtomicString
& name
);
396 void startIconLoader();
398 void applyUserAgent(ResourceRequest
& request
);
400 bool shouldInterruptLoadForXFrameOptions(const String
&, const KURL
&);
403 PassRefPtr
<HistoryItem
> createHistoryItem(bool useOriginal
);
404 PassRefPtr
<HistoryItem
> createHistoryItemTree(Frame
* targetFrame
, bool clipAtTarget
);
406 bool canCachePageContainingThisFrame();
408 void logCanCachePageDecision();
409 bool logCanCacheFrameDecision(int indentLevel
);
412 void addBackForwardItemClippedAtTarget(bool doClip
);
413 void restoreScrollPositionAndViewState();
414 void saveDocumentState();
415 void loadItem(HistoryItem
*, FrameLoadType
);
416 bool urlsMatchItem(HistoryItem
*) const;
417 void invalidateCurrentItemCachedPage();
418 void recursiveGoToItem(HistoryItem
*, HistoryItem
*, FrameLoadType
);
419 bool childFramesMatchItem(HistoryItem
*) const;
421 void updateHistoryForBackForwardNavigation();
422 void updateHistoryForReload();
423 void updateHistoryForStandardLoad();
424 void updateHistoryForRedirectWithLockedBackForwardList();
425 void updateHistoryForClientRedirect();
426 void updateHistoryForCommit();
427 void updateHistoryForAnchorScroll();
429 void redirectionTimerFired(Timer
<FrameLoader
>*);
430 void checkCompletedTimerFired(Timer
<FrameLoader
>*);
431 void checkLoadCompleteTimerFired(Timer
<FrameLoader
>*);
433 void cancelRedirection(bool newLoadInProgress
= false);
438 void parentCompleted();
440 bool shouldUsePlugin(const KURL
&, const String
& mimeType
, bool hasFallback
, bool& useFallback
);
441 bool loadPlugin(RenderPart
*, const KURL
&, const String
& mimeType
,
442 const Vector
<String
>& paramNames
, const Vector
<String
>& paramValues
, bool useFallback
);
444 bool loadProvisionalItemFromCachedPage();
445 void cachePageForHistoryItem(HistoryItem
*);
447 void receivedFirstData();
449 void updatePolicyBaseURL();
450 void setPolicyBaseURL(const KURL
&);
452 void addExtraFieldsToRequest(ResourceRequest
&, FrameLoadType loadType
, bool isMainResource
, bool cookiePolicyURLFromRequest
);
455 void stopLoadingSubframes();
457 void clearProvisionalLoad();
458 void markLoadComplete();
459 void transitionToCommitted(PassRefPtr
<CachedPage
>);
460 void frameLoadCompleted();
462 void mainReceivedError(const ResourceError
&, bool isComplete
);
464 void setLoadType(FrameLoadType
);
466 void checkNavigationPolicy(const ResourceRequest
&, DocumentLoader
*, PassRefPtr
<FormState
>, NavigationPolicyDecisionFunction
, void* argument
);
467 void checkNewWindowPolicy(const NavigationAction
&, const ResourceRequest
&, PassRefPtr
<FormState
>, const String
& frameName
);
469 void continueAfterNavigationPolicy(PolicyAction
);
470 void continueAfterNewWindowPolicy(PolicyAction
);
471 void continueAfterContentPolicy(PolicyAction
);
472 void continueLoadAfterWillSubmitForm(PolicyAction
= PolicyUse
);
474 static void callContinueLoadAfterNavigationPolicy(void*, const ResourceRequest
&, PassRefPtr
<FormState
>, bool shouldContinue
);
475 void continueLoadAfterNavigationPolicy(const ResourceRequest
&, PassRefPtr
<FormState
>, bool shouldContinue
);
476 static void callContinueLoadAfterNewWindowPolicy(void*, const ResourceRequest
&, PassRefPtr
<FormState
>, const String
& frameName
, bool shouldContinue
);
477 void continueLoadAfterNewWindowPolicy(const ResourceRequest
&, PassRefPtr
<FormState
>, const String
& frameName
, bool shouldContinue
);
478 static void callContinueFragmentScrollAfterNavigationPolicy(void*, const ResourceRequest
&, PassRefPtr
<FormState
>, bool shouldContinue
);
479 void continueFragmentScrollAfterNavigationPolicy(const ResourceRequest
&, bool shouldContinue
);
480 bool shouldScrollToAnchor(bool isFormSubmission
, FrameLoadType
, const KURL
&);
481 void addHistoryItemForFragmentScroll();
483 void stopPolicyCheck();
485 void checkLoadCompleteForThisFrame();
487 void setDocumentLoader(DocumentLoader
*);
488 void setPolicyDocumentLoader(DocumentLoader
*);
489 void setProvisionalDocumentLoader(DocumentLoader
*);
491 void setState(FrameState
);
493 void closeOldDataSources();
494 void open(CachedPage
&);
496 void updateHistoryAfterClientRedirect();
498 void clear(bool clearWindowProperties
= true, bool clearScriptObjects
= true);
500 bool shouldReloadToHandleUnreachableURL(DocumentLoader
*);
501 void handleUnimplementablePolicy(const ResourceError
&);
503 void scheduleRedirection(ScheduledRedirection
*);
504 void startRedirectionTimer();
505 void stopRedirectionTimer();
507 #if USE(LOW_BANDWIDTH_DISPLAY)
508 // implementation of CachedResourceClient
509 virtual void notifyFinished(CachedResource
*);
511 void removeAllLowBandwidthDisplayRequests();
512 void switchOutLowBandwidthDisplayIfReady();
515 void dispatchDidCommitLoad();
516 void dispatchAssignIdentifierToInitialRequest(unsigned long identifier
, DocumentLoader
*, const ResourceRequest
&);
517 void dispatchWillSendRequest(DocumentLoader
*, unsigned long identifier
, ResourceRequest
&, const ResourceResponse
& redirectResponse
);
518 void dispatchDidReceiveResponse(DocumentLoader
*, unsigned long identifier
, const ResourceResponse
&);
519 void dispatchDidReceiveContentLength(DocumentLoader
*, unsigned long identifier
, int length
);
520 void dispatchDidFinishLoading(DocumentLoader
*, unsigned long identifier
);
522 static bool isLocationChange(const ScheduledRedirection
&);
523 void scheduleFormSubmission(const FrameLoadRequest
&, bool lockHistory
, bool lockBackForwardList
, PassRefPtr
<Event
>, PassRefPtr
<FormState
>);
525 void loadWithDocumentLoader(DocumentLoader
*, FrameLoadType
, PassRefPtr
<FormState
>); // Calls continueLoadAfterNavigationPolicy
526 void load(DocumentLoader
*); // Calls loadWithDocumentLoader
528 void loadWithNavigationAction(const ResourceRequest
&, const NavigationAction
&, // Calls loadWithDocumentLoader
529 bool lockHistory
, FrameLoadType
, PassRefPtr
<FormState
>);
531 void loadPostRequest(const ResourceRequest
&, const String
& referrer
, // Called by loadFrameRequest, calls loadWithNavigationAction
532 const String
& frameName
, bool lockHistory
, FrameLoadType
, PassRefPtr
<Event
>, PassRefPtr
<FormState
>);
533 void loadURL(const KURL
&, const String
& referrer
, const String
& frameName
, // Called by loadFrameRequest, calls loadWithNavigationAction or dispatches to navigation policy delegate
534 bool lockHistory
, FrameLoadType
, PassRefPtr
<Event
>, PassRefPtr
<FormState
>);
536 void clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress
);
537 void clientRedirected(const KURL
&, double delay
, double fireDate
, bool lockBackForwardList
);
538 bool shouldReload(const KURL
& currentURL
, const KURL
& destinationURL
);
540 void sendRemainingDelegateMessages(unsigned long identifier
, const ResourceResponse
&, int length
, const ResourceError
&);
541 void requestFromDelegate(ResourceRequest
&, unsigned long& identifier
, ResourceError
&);
543 void recursiveCheckLoadComplete();
545 void detachChildren();
547 Frame
* loadSubframe(HTMLFrameOwnerElement
*, const KURL
&, const String
& name
, const String
& referrer
);
551 KURL
historyURL(int distance
);
553 // Returns true if argument is a JavaScript URL.
554 bool executeIfJavaScriptURL(const KURL
&, bool userGesture
= false, bool replaceDocument
= true);
556 bool gotoAnchor(const String
& name
); // returns true if the anchor was found
557 void scrollToAnchor(const KURL
&);
559 void provisionalLoadStarted();
563 bool didOpenURL(const KURL
&);
565 void scheduleCheckCompleted();
566 void scheduleCheckLoadComplete();
568 KURL
originalRequestURL() const;
570 bool shouldTreatURLAsSameAsCurrent(const KURL
&) const;
572 void saveScrollPositionAndViewStateToItem(HistoryItem
*);
575 FrameLoaderClient
* m_client
;
578 FrameLoadType m_loadType
;
580 // Document loaders for the three phases of frame loading. Note that while
581 // a new request is being loaded, the old document loader may still be referenced.
582 // E.g. while a new request is in the "policy" state, the old document loader may
583 // be consulted in particular as it makes sense to imply certain settings on the new loader.
584 RefPtr
<DocumentLoader
> m_documentLoader
;
585 RefPtr
<DocumentLoader
> m_provisionalDocumentLoader
;
586 RefPtr
<DocumentLoader
> m_policyDocumentLoader
;
588 // This identifies the type of navigation action which prompted this load. Note
589 // that WebKit conveys this value as the WebActionNavigationTypeKey value
590 // on navigation action delegate callbacks.
591 FrameLoadType m_policyLoadType
;
592 PolicyCheck m_policyCheck
;
594 bool m_delegateIsHandlingProvisionalLoadError
;
595 bool m_delegateIsDecidingNavigationPolicy
;
596 bool m_delegateIsHandlingUnimplementablePolicy
;
598 bool m_firstLayoutDone
;
599 bool m_quickRedirectComing
;
600 bool m_sentRedirectNotification
;
601 bool m_inStopAllLoaders
;
603 String m_outgoingReferrer
;
605 bool m_isExecutingJavaScriptFormAction
;
606 bool m_isRunningScript
;
608 String m_responseMIMEType
;
610 bool m_didCallImplicitClose
;
611 bool m_wasUnloadEventEmitted
;
612 bool m_unloadEventBeingDispatched
;
614 bool m_isLoadingMainResource
;
619 OwnPtr
<IconLoader
> m_iconLoader
;
620 bool m_mayLoadIconLater
;
622 bool m_cancellingWithLoadInProgress
;
624 OwnPtr
<ScheduledRedirection
> m_scheduledRedirection
;
629 bool m_encodingWasChosenByUser
;
631 RefPtr
<TextResourceDecoder
> m_decoder
;
633 bool m_containsPlugIns
;
635 KURL m_submittedFormURL
;
637 Timer
<FrameLoader
> m_redirectionTimer
;
638 Timer
<FrameLoader
> m_checkCompletedTimer
;
639 Timer
<FrameLoader
> m_checkLoadCompleteTimer
;
642 HashSet
<Frame
*> m_openedFrames
;
646 bool m_creatingInitialEmptyDocument
;
647 bool m_isDisplayingInitialEmptyDocument
;
648 bool m_committedFirstRealDocumentLoad
;
650 RefPtr
<HistoryItem
> m_currentHistoryItem
;
651 RefPtr
<HistoryItem
> m_previousHistoryItem
;
652 RefPtr
<HistoryItem
> m_provisionalHistoryItem
;
654 bool m_didPerformFirstNavigation
;
657 bool m_didDispatchDidCommitLoad
;
660 #if USE(LOW_BANDWIDTH_DISPLAY)
661 // whether to use low bandwidth dislay, set by client
662 bool m_useLowBandwidthDisplay
;
664 // whether to call finishParsing() in switchOutLowBandwidthDisplayIfReady()
665 bool m_finishedParsingDuringLowBandwidthDisplay
;
667 // whether to call switchOutLowBandwidthDisplayIfReady;
668 // true if there is external css, javascript, or subframe/plugin
669 bool m_needToSwitchOutLowBandwidthDisplay
;
671 String m_pendingSourceInLowBandwidthDisplay
;
672 HashSet
<CachedResource
*> m_externalRequestsInLowBandwidthDisplay
;
674 bool m_loadsSynchronously
;
677 bool m_forceReloadWmlDeck
;