Commit b613789e authored by trey's avatar trey
Browse files

fixed 3096030 - Crash in -[WebBackForwardList goToEntry:] when playing with...

	fixed 3096030 - Crash in -[WebBackForwardList goToEntry:] when playing with SnapBack and dictionary.com

        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _isLoadComplete]):  Set state=completed only after we tell the bridge to
	end the load.  This allows client redirects to be processed before we think we're complete.
        (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:]):
	Only process client redirects as such if we are not already complete.  This makes JS driven
	navigations after load-time work like the user would expect, as normal navigations.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 76b81603
2002-11-12 Trey Matteson <trey@apple.com>
fixed 3096030 - Crash in -[WebBackForwardList goToEntry:] when playing with SnapBack and dictionary.com
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _isLoadComplete]): Set state=completed only after we tell the bridge to
end the load. This allows client redirects to be processed before we think we're complete.
(-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:]):
Only process client redirects as such if we are not already complete. This makes JS driven
navigations after load-time work like the user would expect, as normal navigations.
2002-11-12 Maciej Stachowiak <mjs@apple.com>
 
- fixed 3099487 - REGRESSION: dragging an image always puts it in
......
2002-11-12 Trey Matteson <trey@apple.com>
fixed 3096030 - Crash in -[WebBackForwardList goToEntry:] when playing with SnapBack and dictionary.com
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _isLoadComplete]): Set state=completed only after we tell the bridge to
end the load. This allows client redirects to be processed before we think we're complete.
(-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:]):
Only process client redirects as such if we are not already complete. This makes JS driven
navigations after load-time work like the user would expect, as normal navigations.
2002-11-12 Maciej Stachowiak <mjs@apple.com>
 
- fixed 3099487 - REGRESSION: dragging an image always puts it in
......
......@@ -585,8 +585,6 @@ - (void)_isLoadComplete
NSView <WebDocumentView> *thisDocumentView = [thisView documentView];
ASSERT(thisDocumentView != nil);
[self _setState: WebFrameStateComplete];
// FIXME: need to avoid doing this in the non-HTML
// case or the bridge may assert. Should make sure
// there is a bridge/part in the proper state even for
......@@ -596,6 +594,11 @@ - (void)_isLoadComplete
[_private->bridge end];
}
// Important to flip the state after we end the load, because client redirects will
// come out of those, and we want to treat them as part of the same op from the
//user's point of view.
[self _setState: WebFrameStateComplete];
// Unfortunately we have to get our parent to adjust the frames in this
// frameset so this frame's geometry is set correctly. This should
// be a reasonably inexpensive operation.
......@@ -1082,12 +1085,13 @@ - (void)_loadURL:(NSURL *)URL loadType:(WebFrameLoadType)loadType clientRedirect
} else {
WebFrameLoadType previousLoadType = [self _loadType];
WebDataSource *oldDataSource = [[self dataSource] retain];
WebFrameState stateBeforeStartingLoad = [self _state];
[self _loadRequest:request triggeringEvent:event];
// NB: must be done after loadRequest:, which sets the provDataSource, which
// inits the load type to Standard
[self _setLoadType:loadType];
if (clientRedirect) {
if (clientRedirect && stateBeforeStartingLoad != WebFrameStateComplete) {
// Inherit the loadType from the operation that spawned the redirect
[self _setLoadType:previousLoadType];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment