Commit c4784143 authored by trey's avatar trey
Browse files

3135779 - REGRESSION: reproducible assertion failure, going back from ~orubin...

	3135779 - REGRESSION: reproducible assertion failure, going back from ~orubin to the main spies.com page	
	3136218 - REGRESSION: Assertion failure in _restoreScrollPosition running browser buster

	Both were caused by subtle interactions between new code for short-circuiting loading of
	blank pages, and the WebHistoryItem manipulations we do for b/f and reload of child frames.

        Reviewed by Maciej

        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _loadURL:intoChild:]):  Setup provisional or current item before jumping into
	the real work of loading the URL.
        (-[WebFrame _restoreScrollPosition]):  Tweaked to make the assertion message clearer.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 40efe749
2002-12-30 Trey Matteson <trey@apple.com>
3135779 - REGRESSION: reproducible assertion failure, going back from ~orubin to the main spies.com page
3136218 - REGRESSION: Assertion failure in _restoreScrollPosition running browser buster
Both were caused by subtle interactions between new code for short-circuiting loading of
blank pages, and the WebHistoryItem manipulations we do for b/f and reload of child frames.
Reviewed by Maciej
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _loadURL:intoChild:]): Setup provisional or current item before jumping into
the real work of loading the URL.
(-[WebFrame _restoreScrollPosition]): Tweaked to make the assertion message clearer.
2002-12-30 Darin Adler <darin@apple.com>
Reviewed by Don and Ken.
......
......@@ -1476,25 +1476,21 @@ - (void)_loadURL:(NSURL *)URL intoChild:(WebFrame *)childFrame
URL = [childItem URL];
// These behaviors implied by these loadTypes should apply to the child frames
childLoadType = loadType;
}
}
[childFrame _loadURL:URL loadType:childLoadType triggeringEvent:nil isFormSubmission:NO];
if (childItem) {
// We only enter this second if block when the first one succeeded to find a
// matching child frame
if (loadType == WebFrameLoadTypeForward
|| loadType == WebFrameLoadTypeBack
|| loadType == WebFrameLoadTypeIndexedBackForward)
{
// For back/forward, remember this item so we can traverse any child items as child frames load
[childFrame->_private setProvisionalItem:childItem];
} else {
// For reload, just reinstall the current item, since a new child frame was created but we won't be creating a new BF item
[childFrame->_private setCurrentItem:childItem];
if (loadType == WebFrameLoadTypeForward
|| loadType == WebFrameLoadTypeBack
|| loadType == WebFrameLoadTypeIndexedBackForward)
{
// For back/forward, remember this item so we can traverse any child items as child frames load
[childFrame->_private setProvisionalItem:childItem];
} else {
// For reload, just reinstall the current item, since a new child frame was created but we won't be creating a new BF item
[childFrame->_private setCurrentItem:childItem];
}
}
}
[childFrame _loadURL:URL loadType:childLoadType triggeringEvent:nil isFormSubmission:NO];
}
- (void)_postWithURL:(NSURL *)URL data:(NSData *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event
......@@ -1565,9 +1561,8 @@ - (void)_saveScrollPositionToItem:(WebHistoryItem *)item
- (void)_restoreScrollPosition
{
WebHistoryItem *entry = [_private currentItem];
ASSERT(entry);
[[[self webView] documentView] scrollPoint:[entry scrollPoint]];
ASSERT([_private currentItem]);
[[[self webView] documentView] scrollPoint:[[_private currentItem] scrollPoint]];
}
- (void)_scrollToTop
......
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