Commit 0bd844a9 authored by trey's avatar trey
Browse files

3108976 - assert _private provisionalItem in -[WebFrame(WebPrivate) _transitionToCommitted

	3108865 - frames not maintained going back at directory.apple.com

	Both bugs are fixed by the same small change.  We no longer try to inherit loadType
	across redirects.  Instead we just make sure the right thing happens in _transitionToCommitted:
	for redirects in the loadType=Standard case.

	3122721 - History stores both original and redirected sites

	Easy fix while in the neighborhood.  We just don't add to History when doing a redirect.

        Reviewed by rjw

        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _transitionToCommitted:]):  On redirect, update the URL of the frame's current
	item, not the current item in the b/f list.  Also do not add to history on redirect.
        (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):  Cut out funny business
	that tried to guess when to inherit loadtype across redirects.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 89377f1a
2002-12-13 Trey Matteson <trey@apple.com>
3108976 - assert _private provisionalItem in -[WebFrame(WebPrivate) _transitionToCommitted
3108865 - frames not maintained going back at directory.apple.com
Both bugs are fixed by the same small change. We no longer try to inherit loadType
across redirects. Instead we just make sure the right thing happens in _transitionToCommitted:
for redirects in the loadType=Standard case.
3122721 - History stores both original and redirected sites
Easy fix while in the neighborhood. We just don't add to History when doing a redirect.
Reviewed by rjw
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _transitionToCommitted:]): On redirect, update the URL of the frame's current
item, not the current item in the b/f list. Also do not add to history on redirect.
(-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Cut out funny business
that tried to guess when to inherit loadtype across redirects.
2002-12-13 Richard Williamson <rjw@apple.com>
Fixed 3127225. Scale page cache based on available memory.
......
......@@ -560,16 +560,16 @@ - (void)_transitionToCommitted: (NSDictionary *)pageCache
}
case WebFrameLoadTypeStandard:
// Add item to history.
entry = [[WebHistory sharedHistory] addEntryForURL: [[[ds _originalRequest] URL] _web_canonicalize]];
if (ptitle)
[entry setTitle: ptitle];
if (![ds _isClientRedirect]) {
// Add item to history.
entry = [[WebHistory sharedHistory] addEntryForURL: [[[ds _originalRequest] URL] _web_canonicalize]];
if (ptitle)
[entry setTitle: ptitle];
[self _addBackForwardItemClippedAtTarget:YES];
} else {
// update the URL in the BF list that we made before the redirect
[[[[self controller] backForwardList] currentEntry] setURL:[[ds request] URL]];
[[_private currentItem] setURL:[[ds request] URL]];
}
[[self webView] _makeDocumentViewForDataSource:ds];
break;
......@@ -577,6 +577,7 @@ - (void)_transitionToCommitted: (NSDictionary *)pageCache
case WebFrameLoadTypeInternal:
{ // braces because the silly compiler lets you declare vars everywhere but here?!
// Add an item to the item tree for this frame
ASSERT(![ds _isClientRedirect]);
WebHistoryItem *item = [self _createItem];
ASSERT([[self parent]->_private currentItem]);
[[[self parent]->_private currentItem] addChildItem:item];
......@@ -1400,21 +1401,10 @@ - (void)_loadURL:(NSURL *)URL loadType:(WebFrameLoadType)loadType triggeringEven
[self _checkNavigationPolicyForRequest:request dataSource:oldDataSource
andCall:self withSelector:@selector(_continueFragmentScrollAfterNavigationPolicy:request:)];
} else {
WebFrameLoadType previousLoadType = [self _loadType];
[self _loadRequest:request triggeringAction:action loadType:loadType];
if (_private->quickRedirectComing) {
_private->quickRedirectComing = NO;
// Inherit the loadType from the operation that spawned the redirect,
// unless the new load type is some kind of reload imposed by WebKit.
if (loadType != WebFrameLoadTypeReload
&& loadType != WebFrameLoadTypeSame
&& loadType != WebFrameLoadTypeReloadAllowingStaleData)
{
[self _setLoadType:previousLoadType];
}
// need to transfer BF items from the dataSource that we're replacing
WebDataSource *newDataSource = [self provisionalDataSource];
[newDataSource _setIsClientRedirect:YES];
......
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