[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:23:30 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 388fb75ec96de8372723e95b089a34f3874d0683
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 4 16:53:45 2003 +0000

            Reviewed by Ken.
    
            - fixed 3135388 -- encoding changes do not affect text in form elements
    
            The problem was that form data was being saved and restored, and in the case of buttons,
            the form data was the incorrectly decoded button label.
    
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _transitionToLayoutAcceptable]): Remove the default: case so we get a warning if
            we omit one of the enum values from this switch statement.
            (-[WebFrame _transitionToCommitted:]): Move the WebFrameLoadTypeReloadAllowingStaleData
            case up so it's right next to the case it should be merged with.
            (-[WebFrame _isLoadComplete]): Remove the default: case so we get a warning if
            we omit one of enum values from this switch statement.
            (-[WebFrame _itemForRestoringDocState]): Replace the if statement with a switch statement.
            Include WebFrameLoadTypeReloadAllowingStaleData, which fixes the bug.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3560 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index d54e97f..d442f36 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,22 @@
+2003-02-04  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken.
+
+        - fixed 3135388 -- encoding changes do not affect text in form elements
+
+        The problem was that form data was being saved and restored, and in the case of buttons,
+        the form data was the incorrectly decoded button label.
+
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _transitionToLayoutAcceptable]): Remove the default: case so we get a warning if
+        we omit one of the enum values from this switch statement.
+        (-[WebFrame _transitionToCommitted:]): Move the WebFrameLoadTypeReloadAllowingStaleData
+        case up so it's right next to the case it should be merged with.
+        (-[WebFrame _isLoadComplete]): Remove the default: case so we get a warning if
+        we omit one of enum values from this switch statement.
+        (-[WebFrame _itemForRestoringDocState]): Replace the if statement with a switch statement.
+        Include WebFrameLoadTypeReloadAllowingStaleData, which fixes the bug.
+
 2003-02-03  Richard Williamson   <rjw at apple.com>
 
         Fixed headerdoc type.
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 191d878..d29f662 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -466,22 +466,16 @@ Repeat load of the same URL (by any other means of navigation other than the rel
                     [self _scheduleLayout: timedDelay];
                 }
             }
-            break;
+            return;
         }
 
         case WebFrameStateProvisional:
         case WebFrameStateComplete:
         case WebFrameStateCompleting:
         case WebFrameStateLayoutAcceptable:
-        {
-            break;
-        }
-        
-        default:
-        {
-            ASSERT_NOT_REACHED();
-        }
+            return;
     }
+    ASSERT_NOT_REACHED();
 }
 
 - (void)_makeDocumentView
@@ -573,6 +567,11 @@ Repeat load of the same URL (by any other means of navigation other than the rel
                 break;
             }
 
+            // FIXME - just get rid of this case, and merge WebFrameLoadTypeReloadAllowingStaleData with the above case
+            case WebFrameLoadTypeReloadAllowingStaleData:
+                [self _makeDocumentView];
+                break;
+                
             case WebFrameLoadTypeStandard:
                 if (![ds _isClientRedirect]) {
                     // Add item to history.
@@ -603,11 +602,6 @@ Repeat load of the same URL (by any other means of navigation other than the rel
                 [self _makeDocumentView];
                 break;
 
-            // FIXME - just get rid of this case, and merge WebFrameLoadTypeReloadAllowingStaleData with one of the other reload types
-            case WebFrameLoadTypeReloadAllowingStaleData:
-                [self _makeDocumentView];
-                break;
-                
             // FIXME Remove this check when dummy ds is removed.  An exception should be thrown
             // if we're in the WebFrameLoadTypeUninitialized state.
             default:
@@ -919,13 +913,10 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
             [_private setPreviousItem:nil];
             return;
         }
-        
-        // Yikes!  Serious horkage.
-        default:
-        {
-            ASSERT_NOT_REACHED();
-        }
     }
+    
+    // Yikes!  Serious horkage.
+    ASSERT_NOT_REACHED();
 }
 
 + (void)_recursiveCheckCompleteFromFrame: (WebFrame *)fromFrame
@@ -1697,13 +1688,21 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
 - (WebHistoryItem *)_itemForRestoringDocState
 {
-    WebFrameLoadType loadType = [self _loadType];
-    if (loadType == WebFrameLoadTypeReload || loadType == WebFrameLoadTypeSame) {
-        // Don't restore any form state on reload or loadSame
-        return nil;
-    } else {
-        return [_private currentItem];
+    switch ([self _loadType]) {
+        case WebFrameLoadTypeReload:
+        case WebFrameLoadTypeReloadAllowingStaleData:
+        case WebFrameLoadTypeSame:
+            // Don't restore any form state on reload or loadSame
+            return nil;
+        case WebFrameLoadTypeBack:
+        case WebFrameLoadTypeForward:
+        case WebFrameLoadTypeIndexedBackForward:
+        case WebFrameLoadTypeInternal:
+        case WebFrameLoadTypeStandard:
+            return [_private currentItem];
     }
+    ASSERT_NOT_REACHED();
+    return nil;
 }
 
 -(void)_continueLoadRequestAfterNavigationPolicy:(BOOL)shouldContinue request:(WebResourceRequest *)request

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list