[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:11:09 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b981cf8fc1a279c488a4f91ffa744ddd97f0f708
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 4 05:18:13 2002 +0000

    	Re-fix of 3113393 - Clients side redirects shouldn't always add item to back/forward list
    	Fix 3116980 - REGRESSION: Back button goes back twice
    	Fix 3099631 - assertion failure at http://www.calendarlive.com/ when pop-up blocking is off
    
    	The earlier fix for the first bug was to consider any redirect happening within one
    	second as a continuation of the previous load.  To fix the regressions I re-cast that
    	fix using a similar, pre-existing mechanism.
    
            Reviewed by: Richwill
    
            * WebView.subproj/WebFramePrivate.h:  Nuke shortRedirectComing, rename
    	instantRedirectComing to quickRedirectComing.
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _createOrUpdateItem]):  Remove code related to shortRedirectComing,
    	the fix that brought the regressions.
            (-[WebFrame _setState:]):  Don't cache the page we're leaving if we're doing
    	a redirect (since we don't want the redirecting page in the cache).
            (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):  Above rename.
            (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):  Above rename.
            (-[WebFrame _loadURL:intoChild:]):  Comment fix.
            (-[WebFrame _clientRedirectedTo:delay:fireDate:]):  Use 1 second instead of 0
    	seconds as the metric of a client redirect.  Do not consider whether the frame
    	state is completed as part of the decision.
            (-[WebFrame _clientRedirectCancelled]):  Above rename.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2923 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index a8864a3..fc58db0 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,30 @@
+2002-12-03  Trey Matteson  <trey at apple.com>
+
+	Re-fix of 3113393 - Clients side redirects shouldn't always add item to back/forward list
+	Fix 3116980 - REGRESSION: Back button goes back twice
+	Fix 3099631 - assertion failure at http://www.calendarlive.com/ when pop-up blocking is off
+
+	The earlier fix for the first bug was to consider any redirect happening within one
+	second as a continuation of the previous load.  To fix the regressions I re-cast that
+	fix using a similar, pre-existing mechanism.
+
+        Reviewed by: Richwill
+
+        * WebView.subproj/WebFramePrivate.h:  Nuke shortRedirectComing, rename
+	instantRedirectComing to quickRedirectComing.
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _createOrUpdateItem]):  Remove code related to shortRedirectComing,
+	the fix that brought the regressions.
+        (-[WebFrame _setState:]):  Don't cache the page we're leaving if we're doing
+	a redirect (since we don't want the redirecting page in the cache).
+        (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):  Above rename.
+        (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):  Above rename.
+        (-[WebFrame _loadURL:intoChild:]):  Comment fix.
+        (-[WebFrame _clientRedirectedTo:delay:fireDate:]):  Use 1 second instead of 0
+	seconds as the metric of a client redirect.  Do not consider whether the frame
+	state is completed as part of the decision.
+        (-[WebFrame _clientRedirectCancelled]):  Above rename.
+
 2002-12-03  John Sullivan  <sullivan at apple.com>
 
         Reviewed by: Darin
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index a8864a3..fc58db0 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,30 @@
+2002-12-03  Trey Matteson  <trey at apple.com>
+
+	Re-fix of 3113393 - Clients side redirects shouldn't always add item to back/forward list
+	Fix 3116980 - REGRESSION: Back button goes back twice
+	Fix 3099631 - assertion failure at http://www.calendarlive.com/ when pop-up blocking is off
+
+	The earlier fix for the first bug was to consider any redirect happening within one
+	second as a continuation of the previous load.  To fix the regressions I re-cast that
+	fix using a similar, pre-existing mechanism.
+
+        Reviewed by: Richwill
+
+        * WebView.subproj/WebFramePrivate.h:  Nuke shortRedirectComing, rename
+	instantRedirectComing to quickRedirectComing.
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _createOrUpdateItem]):  Remove code related to shortRedirectComing,
+	the fix that brought the regressions.
+        (-[WebFrame _setState:]):  Don't cache the page we're leaving if we're doing
+	a redirect (since we don't want the redirecting page in the cache).
+        (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):  Above rename.
+        (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):  Above rename.
+        (-[WebFrame _loadURL:intoChild:]):  Comment fix.
+        (-[WebFrame _clientRedirectedTo:delay:fireDate:]):  Use 1 second instead of 0
+	seconds as the metric of a client redirect.  Do not consider whether the frame
+	state is completed as part of the decision.
+        (-[WebFrame _clientRedirectCancelled]):  Above rename.
+
 2002-12-03  John Sullivan  <sullivan at apple.com>
 
         Reviewed by: Darin
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index a181374..682a367 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -66,14 +66,13 @@ typedef enum {
     WebHistoryItem *provisionalItem;	// BF item for where we're trying to go
                                         // (only known when navigating to a pre-existing BF item)
     WebHistoryItem *previousItem;	// BF item for previous content, see _itemForSavingDocState
-    BOOL instantRedirectComing;
-    BOOL shortRedirectComing;
 
     WebPolicyDecisionListener *listener;
     WebResourceRequest *policyRequest;
     id policyTarget;
     SEL policySelector;
     BOOL justOpenedForTargetedLink;
+    BOOL quickRedirectComing;
 }
 
 - (void)setName:(NSString *)name;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 402bc50..e6b4b25 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -181,25 +181,15 @@ static const char * const loadTypeNames[] = {
     WebDataSource *dataSrc = [self dataSource];
     NSURL *url = [[dataSrc request] URL];
     WebHistoryItem *bfItem;
-    
-    if (!_private->shortRedirectComing){
-        bfItem = [[[WebHistoryItem alloc] initWithURL:url target:[self name] parent:[[self parent] name] title:[dataSrc pageTitle]] autorelease];
-        [bfItem setAnchor:[url fragment]];
-        [dataSrc _addBackForwardItem:bfItem];
-    
-        // Set the item for which we will save document state
-        [_private setPreviousItem:[_private currentItem]];
-        [_private setCurrentItem:bfItem];
-    }
-     else {
-        _private->shortRedirectComing = NO;
-        bfItem = [_private currentItem];
-        [bfItem setURL: url];
-        [bfItem setTitle: [dataSrc pageTitle]];
-        [bfItem setParent: [[self parent] name]];
-        [bfItem setAnchor:[url fragment]];
-    }
-    
+
+    bfItem = [[[WebHistoryItem alloc] initWithURL:url target:[self name] parent:[[self parent] name] title:[dataSrc pageTitle]] autorelease];
+    [bfItem setAnchor:[url fragment]];
+    [dataSrc _addBackForwardItem:bfItem];
+
+    // Set the item for which we will save document state
+    [_private setPreviousItem:[_private currentItem]];
+    [_private setCurrentItem:bfItem];
+
     return bfItem;
 }
 
@@ -613,13 +603,14 @@ static const char * const loadTypeNames[] = {
         [[[self webView] frameScrollView] setDrawsBackground:NO];
 
         // Cache the page, if possible.
-        if ([self _canCachePage] && [_private->bridge canCachePage] && [_private currentItem] && ![[self dataSource] isLoading]){
-            if (![[_private currentItem] pageCache]){
+        WebHistoryItem *item = [_private currentItem];
+        if ([self _canCachePage] && [_private->bridge canCachePage] && item && !_private->quickRedirectComing && ![[self dataSource] isLoading]){
+            if (![item pageCache]){
                 printf ("Saving page to back/forward cache, %s\n", [[[[self dataSource] URL] absoluteString] cString]);
-                [[_private currentItem] setHasPageCache: YES];
+                [item setHasPageCache: YES];
                 [[self dataSource] _setStoredInPageCache: YES];
-                [[[_private currentItem] pageCache] setObject: [self dataSource] forKey: @"WebKitDataSource"];
-                [[[_private currentItem] pageCache] setObject: [[self webView] documentView] forKey: @"WebKitDocumentView"];
+                [[item pageCache] setObject: [self dataSource] forKey: @"WebKitDataSource"];
+                [[item pageCache] setObject: [[self webView] documentView] forKey: @"WebKitDocumentView"];
                 [_private->bridge saveDocumentToPageCache];
                 [self _purgePageCache];
             }
@@ -1149,8 +1140,8 @@ static const char * const loadTypeNames[] = {
     NSURL *URL = [request URL];
     WebDataSource *dataSrc = [self dataSource];
 
-    BOOL isRedirect = _private->instantRedirectComing;
-    _private->instantRedirectComing = NO;
+    BOOL isRedirect = _private->quickRedirectComing;
+    _private->quickRedirectComing = NO;
 
     [dataSrc _setURL:URL];
     if (!isRedirect) {
@@ -1222,8 +1213,8 @@ static const char * const loadTypeNames[] = {
         WebDataSource *oldDataSource = [[self dataSource] retain];
 
         [self _loadRequest:request triggeringAction:action loadType:loadType];
-        if (_private->instantRedirectComing) {
-            _private->instantRedirectComing = NO;
+        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.
@@ -1266,7 +1257,7 @@ static const char * const loadTypeNames[] = {
     }
             
     [childFrame _loadURL:URL loadType:childLoadType triggeringEvent:nil isFormSubmission:NO];
-    // want this here???
+
     if (childItem) {
         if (loadType != WebFrameLoadTypeReload) {
             // For back/forward, remember this item so we can traverse any child items as child frames load
@@ -1302,25 +1293,19 @@ static const char * const loadTypeNames[] = {
     LOG(Redirect, "Client redirect to: %@", URL);
 
     [[[self controller] locationChangeDelegate] clientWillRedirectTo:URL delay:seconds fireDate:date forFrame:self];
-    // If a zero-time redirect comes in and we're still finishing the previous page, we set
-    // a special mode so we treat the next load as part of the same navigation.
-    if (seconds == 0.0 && [self _state] != WebFrameStateComplete) {
-        _private->instantRedirectComing = YES;
+    // If a "quick" redirect comes in an, we set a special mode so we treat the next
+    // load as part of the same navigation.
+    // If we don't have a dataSource, we have no "original" load on which to base a redirect,
+    // so we better just treat the redirect as a normal load.
+    if (seconds <= 1.0 && [self dataSource]) {
+        _private->quickRedirectComing = YES;
     }
-    
-    // We don't create new back/forward items if a redirect is expected to happen in
-    // less than 1 second.  This prevents getting 'stuck' in a back forward loop
-    // when going back.  Also it prevent the intermediate page from being cached in
-    // the back forward page cache.
-    if (seconds <= 1.0)
-        _private->shortRedirectComing = YES;
 }
 
 - (void)_clientRedirectCancelled
 {
     [[[self controller] locationChangeDelegate] clientRedirectCancelledForFrame:self];
-    _private->instantRedirectComing = NO;
-    _private->shortRedirectComing = NO;
+    _private->quickRedirectComing = NO;
 }
 
 - (void)_saveScrollPositionToItem:(WebHistoryItem *)item

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list