[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
trey
trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:02:26 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c3ec70929f350b4cced5d9cc4a95c0fa08475f36
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 18 05:59:01 2002 +0000
Fixed 3102076 - REGRESSION: infinite recursion involving bridge end
Fixed 3100929 - REGRESSION: serverRedirectedForDataSource: not sent on server redirects
Fixed 3103381 - REGRESSION: Going back from anchor doesn't restore scroll position
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate handle:willSendRequest:]): Return the copy of the
request that we make instead of the original.
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient handle:willSendRequest:]): Call super after we make our mods
to the request, so the copy that super makes for us includes those mods.
* WebView.subproj/WebFramePrivate.h: Added new state, WebFrameStateCompleting.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _transitionToLayoutAcceptable]): Completing state is a NOP.
(-[WebFrame _transitionToCommitted]): Completing state is a NOP.
(-[WebFrame _isLoadComplete]): Go to Completing state before calling [bridge end].
Go to Completed state afterwards, only if no new loads started in the meantime.
(-[WebFrame _loadItem:fromItem:withLoadType:]): When doing anchor nav to get to the
item, save and restore scroll state, and set the current item.
(-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):
Reorder the steps so the right scroll state gets saved to the right place. Also, don't
add a backForward item if we're doing a client redirect to an anchor.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b210a33..5841675 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,28 @@
+2002-11-17 Trey Matteson <trey at apple.com>
+
+ Fixed 3102076 - REGRESSION: infinite recursion involving bridge end
+ Fixed 3100929 - REGRESSION: serverRedirectedForDataSource: not sent on server redirects
+ Fixed 3103381 - REGRESSION: Going back from anchor doesn't restore scroll position
+
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ (-[WebBaseResourceHandleDelegate handle:willSendRequest:]): Return the copy of the
+ request that we make instead of the original.
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient handle:willSendRequest:]): Call super after we make our mods
+ to the request, so the copy that super makes for us includes those mods.
+
+ * WebView.subproj/WebFramePrivate.h: Added new state, WebFrameStateCompleting.
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _transitionToLayoutAcceptable]): Completing state is a NOP.
+ (-[WebFrame _transitionToCommitted]): Completing state is a NOP.
+ (-[WebFrame _isLoadComplete]): Go to Completing state before calling [bridge end].
+ Go to Completed state afterwards, only if no new loads started in the meantime.
+ (-[WebFrame _loadItem:fromItem:withLoadType:]): When doing anchor nav to get to the
+ item, save and restore scroll state, and set the current item.
+ (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):
+ Reorder the steps so the right scroll state gets saved to the right place. Also, don't
+ add a backForward item if we're doing a client redirect to an anchor.
+
2002-11-17 David Hyatt <hyatt at apple.com>
Back out my previous fix. I have a better one that is
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b210a33..5841675 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,28 @@
+2002-11-17 Trey Matteson <trey at apple.com>
+
+ Fixed 3102076 - REGRESSION: infinite recursion involving bridge end
+ Fixed 3100929 - REGRESSION: serverRedirectedForDataSource: not sent on server redirects
+ Fixed 3103381 - REGRESSION: Going back from anchor doesn't restore scroll position
+
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ (-[WebBaseResourceHandleDelegate handle:willSendRequest:]): Return the copy of the
+ request that we make instead of the original.
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient handle:willSendRequest:]): Call super after we make our mods
+ to the request, so the copy that super makes for us includes those mods.
+
+ * WebView.subproj/WebFramePrivate.h: Added new state, WebFrameStateCompleting.
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _transitionToLayoutAcceptable]): Completing state is a NOP.
+ (-[WebFrame _transitionToCommitted]): Completing state is a NOP.
+ (-[WebFrame _isLoadComplete]): Go to Completing state before calling [bridge end].
+ Go to Completed state afterwards, only if no new loads started in the meantime.
+ (-[WebFrame _loadItem:fromItem:withLoadType:]): When doing anchor nav to get to the
+ item, save and restore scroll state, and set the current item.
+ (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):
+ Reorder the steps so the right scroll state gets saved to the right place. Also, don't
+ add a backForward item if we're doing a client redirect to an anchor.
+
2002-11-17 David Hyatt <hyatt at apple.com>
Back out my previous fix. I have a better one that is
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index a14ef22..41bc7d3 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -142,10 +142,10 @@
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:[dataSource controller]];
}
[currentURL release];
- currentURL = [[newRequest URL] retain];
+ currentURL = [[request URL] retain];
[[WebStandardPanels sharedStandardPanels] _didStartLoadingURL:currentURL inController:[dataSource controller]];
- return newRequest;
+ return request;
}
-(void)handle:(WebResourceHandle *)h didReceiveResponse:(WebResourceResponse *)r
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 9194f3a..71f56ae 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -26,6 +26,9 @@ typedef enum {
// This state indicates that it is reasonable to perform a layout.
WebFrameStateLayoutAcceptable,
+ // We've decided we're complete, and khtml is ending the load
+ WebFrameStateCompleting,
+
WebFrameStateComplete
} WebFrameState;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index cb04648..bada4d4 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -38,6 +38,7 @@ static const char * const stateNames[] = {
"WebFrameStateProvisional",
"WebFrameStateCommittedPage",
"WebFrameStateLayoutAcceptable",
+ "WebFrameStateCompleting",
"WebFrameStateComplete"
};
@@ -388,6 +389,7 @@ static const char * const stateNames[] = {
case WebFrameStateProvisional:
case WebFrameStateComplete:
+ case WebFrameStateCompleting:
case WebFrameStateLayoutAcceptable:
{
break;
@@ -506,6 +508,7 @@ static const char * const stateNames[] = {
case WebFrameStateCommittedPage:
case WebFrameStateLayoutAcceptable:
+ case WebFrameStateCompleting:
case WebFrameStateComplete:
default:
{
@@ -601,6 +604,7 @@ static const char * const stateNames[] = {
// Should instead make sure the bridge/part is in the proper state even for
// non-HTML content, or make a call to the document and let it deal with the bridge.
+ [self _setState:WebFrameStateCompleting];
if ([ds isDocumentHTML]) {
[_private->bridge end];
}
@@ -608,8 +612,8 @@ static const char * const stateNames[] = {
// 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. But it's possible we that inside the call to
- // end we may navigate, so we have to check for that.
- if ([self _state] != WebFrameStateProvisional) {
+ // end we may navigate, so we have to check for a state change since calling end.
+ if ([self _state] == WebFrameStateCompleting) {
[self _setState:WebFrameStateComplete];
}
@@ -680,6 +684,9 @@ static const char * const stateNames[] = {
return;
}
+ case WebFrameStateCompleting:
+ return;
+
case WebFrameStateComplete:
{
LOG(Loading, "%@: checking complete, current state WebFrameStateComplete", [self name]);
@@ -778,7 +785,16 @@ static const char * const stateNames[] = {
[[itemURL _web_URLByRemovingFragment] isEqual: [currentURL _web_URLByRemovingFragment]] &&
(!_private->children || ![_private->children count]))
{
+ // must do this maintenance here, since we don't go through a real page reload
+ [self _saveScrollPositionToItem:[_private currentItem]];
+ // FIXME: form state might want to be saved here too
+
[[_private->dataSource _bridge] scrollToAnchor: [item anchor]];
+
+ // must do this maintenance here, since we don't go through a real page reload
+ [_private setCurrentItem:item];
+ [self _restoreScrollPosition];
+
[[[self controller] locationChangeDelegate] locationChangedWithinPageForDataSource:_private->dataSource];
} else {
request = [[WebResourceRequest alloc] initWithURL:itemURL];
@@ -1044,21 +1060,25 @@ static const char * const stateNames[] = {
NSURL *URL = [request URL];
WebDataSource *dataSrc = [self dataSource];
- // save scroll position before we open URL, which will jump to anchor
- [self _saveScrollPositionToItem:[_private currentItem]];
-
- // ???Might need to save scroll-state, form-state for all other frames
-
- ASSERT(![_private previousItem]);
- // will save form state to current item, since prevItem not set
- [_private->bridge openURL:[URL absoluteString] reload:NO headers:nil];
+ BOOL isRedirect = _private->instantRedirectComing;
+ _private->instantRedirectComing = NO;
+
[dataSrc _setURL:URL];
- // NB: must happen after _setURL, since we add based on the current request
- [self _addBackForwardItemClippedAtTarget:NO];
- // This will clear previousItem from the rest of the frame tree tree that didn't
- // doing any loading. We need to make a pass on this now, since for anchor nav
- // we'll not go through a real load and reach Completed state
- [self _checkLoadComplete];
+ if (!isRedirect) {
+ ASSERT(![_private previousItem]);
+ // NB: must happen after _setURL, since we add based on the current request.
+ // Must also happen before we openURL and displace the scroll position, since
+ // adding the BF item will save away scroll state.
+ [self _addBackForwardItemClippedAtTarget:NO];
+ }
+ [_private->bridge openURL:[URL absoluteString] reload:NO headers:nil];
+ if (!isRedirect) {
+ // This will clear previousItem from the rest of the frame tree tree that didn't
+ // doing any loading. We need to make a pass on this now, since for anchor nav
+ // we'll not go through a real load and reach Completed state
+ [self _checkLoadComplete];
+ }
+
[[[self controller] locationChangeDelegate] locationChangedWithinPageForDataSource:dataSrc];
}
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index a14ef22..41bc7d3 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -142,10 +142,10 @@
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:[dataSource controller]];
}
[currentURL release];
- currentURL = [[newRequest URL] retain];
+ currentURL = [[request URL] retain];
[[WebStandardPanels sharedStandardPanels] _didStartLoadingURL:currentURL inController:[dataSource controller]];
- return newRequest;
+ return request;
}
-(void)handle:(WebResourceHandle *)h didReceiveResponse:(WebResourceResponse *)r
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 57142a9..4c5a501 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -112,8 +112,6 @@
-(WebResourceRequest *)handle:(WebResourceHandle *)h willSendRequest:(WebResourceRequest *)newRequest
{
- newRequest = [super handle:h willSendRequest:newRequest];
-
ASSERT(newRequest != nil);
NSURL *URL = [newRequest URL];
@@ -125,7 +123,10 @@
if ([dataSource webFrame] == [[dataSource controller] mainFrame]) {
[newRequest setCookiePolicyBaseURL:URL];
}
-
+
+ // note super will make a copy for us, so reassigning newRequest is important
+ newRequest = [super handle:h willSendRequest:newRequest];
+
// Don't set this on the first request. It is set
// when the main load was started.
[dataSource _setRequest:newRequest];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 57142a9..4c5a501 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -112,8 +112,6 @@
-(WebResourceRequest *)handle:(WebResourceHandle *)h willSendRequest:(WebResourceRequest *)newRequest
{
- newRequest = [super handle:h willSendRequest:newRequest];
-
ASSERT(newRequest != nil);
NSURL *URL = [newRequest URL];
@@ -125,7 +123,10 @@
if ([dataSource webFrame] == [[dataSource controller] mainFrame]) {
[newRequest setCookiePolicyBaseURL:URL];
}
-
+
+ // note super will make a copy for us, so reassigning newRequest is important
+ newRequest = [super handle:h willSendRequest:newRequest];
+
// Don't set this on the first request. It is set
// when the main load was started.
[dataSource _setRequest:newRequest];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list