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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:28:57 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ac3c696c4967bce2dc713d81a4c522d72e2713e7
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 2 01:51:31 2002 +0000

            Effort towards 3014555 (going back to frame), but not fixed.
            Need to think more about appropriate solution and compromises.
    
            * History.subproj/WebBackForwardList.h:
            * History.subproj/WebBackForwardList.m:
            (-[WebBackForwardList backEntryAtIndex:]):
            * History.subproj/WebHistoryItem.h:
            * History.subproj/WebHistoryItem.m:
            (-[WebHistoryItem initWithURL:title:]):
            (-[WebHistoryItem initWithURL:title:image:]):
            (-[WebHistoryItem initWithURL:target:parent:title:image:]):
            (-[WebHistoryItem dealloc]):
            (-[WebHistoryItem parent]):
            (-[WebHistoryItem setTitle:]):
            (-[WebHistoryItem setTarget:]):
            (-[WebHistoryItem setParent:]):
            (-[WebHistoryItem setDisplayTitle:]):
            * WebCoreSupport.subproj/WebBridge.m:
            * WebView.subproj/WebController.m:
            (-[WebController _goToItem:withFrameLoadType:]):
            * WebView.subproj/WebFramePrivate.h:
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _transitionToCommitted]):
            (-[WebFrame _isLoadComplete]):
            (-[WebFrame _scrollToTop]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1724 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0d39e09..10492ca 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,31 @@
+2002-08-01  Richard Williamson (Local)  <rjw at apple.com>
+
+        Effort towards 3014555 (going back to frame), but not fixed.  
+        Need to think more about appropriate solution and compromises.
+        
+        * History.subproj/WebBackForwardList.h:
+        * History.subproj/WebBackForwardList.m:
+        (-[WebBackForwardList backEntryAtIndex:]):
+        * History.subproj/WebHistoryItem.h:
+        * History.subproj/WebHistoryItem.m:
+        (-[WebHistoryItem initWithURL:title:]):
+        (-[WebHistoryItem initWithURL:title:image:]):
+        (-[WebHistoryItem initWithURL:target:parent:title:image:]):
+        (-[WebHistoryItem dealloc]):
+        (-[WebHistoryItem parent]):
+        (-[WebHistoryItem setTitle:]):
+        (-[WebHistoryItem setTarget:]):
+        (-[WebHistoryItem setParent:]):
+        (-[WebHistoryItem setDisplayTitle:]):
+        * WebCoreSupport.subproj/WebBridge.m:
+        * WebView.subproj/WebController.m:
+        (-[WebController _goToItem:withFrameLoadType:]):
+        * WebView.subproj/WebFramePrivate.h:
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _transitionToCommitted]):
+        (-[WebFrame _isLoadComplete]):
+        (-[WebFrame _scrollToTop]):
+
 2002-08-01  Chris Blumenberg  <cblu at apple.com>
 
 	Only send command key events if the plug-in is in the responder chain.
@@ -23,7 +51,7 @@
 
 2002-08-01  Richard Williamson (Local)  <rjw at apple.com>
 
-        More back/forward word.  Support for restoring scroll position.
+        More back/forward work.  Support for restoring scroll position.
         We still have a big remaining issue.  We don't record the entire
         frame tree in back/forward items.  This means going back or forward
         to a frame will looose the context of the containing frameset,
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0d39e09..10492ca 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,31 @@
+2002-08-01  Richard Williamson (Local)  <rjw at apple.com>
+
+        Effort towards 3014555 (going back to frame), but not fixed.  
+        Need to think more about appropriate solution and compromises.
+        
+        * History.subproj/WebBackForwardList.h:
+        * History.subproj/WebBackForwardList.m:
+        (-[WebBackForwardList backEntryAtIndex:]):
+        * History.subproj/WebHistoryItem.h:
+        * History.subproj/WebHistoryItem.m:
+        (-[WebHistoryItem initWithURL:title:]):
+        (-[WebHistoryItem initWithURL:title:image:]):
+        (-[WebHistoryItem initWithURL:target:parent:title:image:]):
+        (-[WebHistoryItem dealloc]):
+        (-[WebHistoryItem parent]):
+        (-[WebHistoryItem setTitle:]):
+        (-[WebHistoryItem setTarget:]):
+        (-[WebHistoryItem setParent:]):
+        (-[WebHistoryItem setDisplayTitle:]):
+        * WebCoreSupport.subproj/WebBridge.m:
+        * WebView.subproj/WebController.m:
+        (-[WebController _goToItem:withFrameLoadType:]):
+        * WebView.subproj/WebFramePrivate.h:
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _transitionToCommitted]):
+        (-[WebFrame _isLoadComplete]):
+        (-[WebFrame _scrollToTop]):
+
 2002-08-01  Chris Blumenberg  <cblu at apple.com>
 
 	Only send command key events if the plug-in is in the responder chain.
@@ -23,7 +51,7 @@
 
 2002-08-01  Richard Williamson (Local)  <rjw at apple.com>
 
-        More back/forward word.  Support for restoring scroll position.
+        More back/forward work.  Support for restoring scroll position.
         We still have a big remaining issue.  We don't record the entire
         frame tree in back/forward items.  This means going back or forward
         to a frame will looose the context of the containing frameset,
diff --git a/WebKit/History.subproj/WebBackForwardList.h b/WebKit/History.subproj/WebBackForwardList.h
index 39ab8c7..ca0ca6f 100644
--- a/WebKit/History.subproj/WebBackForwardList.h
+++ b/WebKit/History.subproj/WebBackForwardList.h
@@ -25,6 +25,7 @@
 -(void)goForwardToIndex: (int)pos;
 
 // examine entries without changing position
+- (WebHistoryItem *)backEntryAtIndex: (int)pos;
 -(WebHistoryItem *)backEntry;
 -(WebHistoryItem *)currentEntry;
 -(WebHistoryItem *)forwardEntry;
diff --git a/WebKit/History.subproj/WebBackForwardList.m b/WebKit/History.subproj/WebBackForwardList.m
index d68a49e..335f7d7 100644
--- a/WebKit/History.subproj/WebBackForwardList.m
+++ b/WebKit/History.subproj/WebBackForwardList.m
@@ -51,6 +51,21 @@
 {
 }
 
+- (WebHistoryItem *)backEntryAtIndex: (int)pos
+{
+    WebHistoryItem *result;
+    int count;
+    
+    count = [uriList count];
+    if (count > 1 && index+pos < (count - 1)) {
+        result = [uriList entryAtIndex:index+1+pos];
+    } else {
+        result = nil;
+    }
+
+    return result;
+}
+
 -(WebHistoryItem *)backEntry
 {
     WebHistoryItem *result;
diff --git a/WebKit/History.subproj/WebHistoryItem.h b/WebKit/History.subproj/WebHistoryItem.h
index e0a8992..0e5f861 100644
--- a/WebKit/History.subproj/WebHistoryItem.h
+++ b/WebKit/History.subproj/WebHistoryItem.h
@@ -9,6 +9,7 @@
 {
     NSURL *_url;
     NSString *_target;
+    NSString *_parent;
     NSString *_title;
     NSString *_displayTitle;
     NSImage *_image;
@@ -22,13 +23,14 @@
 - (id)init;
 - (id)initWithURL:(NSURL *)url title:(NSString *)title;
 - (id)initWithURL:(NSURL *)url title:(NSString *)title image:(NSImage *)image;
-- (id)initWithURL:(NSURL *)url target: (NSString *)target title:(NSString *)title image:(NSImage *)image;
+- (id)initWithURL:(NSURL *)url target: (NSString *)target parent: (NSString *)parent title:(NSString *)title image:(NSImage *)image;
 
 - (NSDictionary *)dictionaryRepresentation;
 - (id)initFromDictionaryRepresentation:(NSDictionary *)dict;
 
 - (NSURL *)url;
 - (NSString *)target;
+- (NSString *)parent;
 - (NSString *)title;
 - (NSString *)displayTitle;
 - (NSImage *)image;
@@ -36,6 +38,7 @@
 
 - (void)setURL:(NSURL *)url;
 - (void)setTarget:(NSString *)target;
+- (void)setParent:(NSString *)parent;
 - (void)setTitle:(NSString *)title;
 - (void)setDisplayTitle:(NSString *)displayTitle;
 - (void)setImage:(NSImage *)image;
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index c35a9f7..7fd99c2 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -23,15 +23,15 @@
 
 -(id)initWithURL:(NSURL *)url title:(NSString *)title
 {
-    return [self initWithURL:url target: nil title:title image:nil];
+    return [self initWithURL:url target: nil parent: nil title:title image:nil];
 }
 
 -(id)initWithURL:(NSURL *)url title:(NSString *)title image:(NSImage *)image
 {
-    return [self initWithURL:url target: nil title:title image:image];
+    return [self initWithURL:url target: nil parent: nil title:title image:image];
 }
 
--(id)initWithURL:(NSURL *)url target: (NSString *)target title:(NSString *)title image:(NSImage *)image
+-(id)initWithURL:(NSURL *)url target: (NSString *)target parent: (NSString *)parent title:(NSString *)title image:(NSImage *)image
 {
     if (self != [super init])
     {
@@ -39,8 +39,9 @@
     }
     
     _url = [url retain];
-    _target = [target copy];
-    _title = [title copy];
+    _target = [target retain];
+    _parent = [parent retain];
+    _title = [title retain];
     _image = [image retain];
     _lastVisitedDate = [[NSCalendarDate alloc] init];
     
@@ -51,6 +52,7 @@
 {
     [_url release];
     [_target release];
+    [_parent release];
     [_title release];
     [_displayTitle release];
     [_image release];
@@ -69,6 +71,11 @@
     return _target;
 }
 
+-(NSString *)parent
+{
+    return _parent;
+}
+
 -(NSString *)title
 {
     return _title;
@@ -105,7 +112,7 @@
 {
     if (title != _title) {
         [_title release];
-        _title = [title copy];
+        _title = [title retain];
     }
 }
 
@@ -113,7 +120,15 @@
 {
     if (target != _target) {
         [_target release];
-        _target = [target copy];
+        _target = [target retain];
+    }
+}
+
+-(void)setParent:(NSString *)parent
+{
+    if (parent != _parent) {
+        [_parent release];
+        _parent = [parent retain];
     }
 }
 
@@ -121,7 +136,7 @@
 {
     if (displayTitle != _displayTitle) {
         [_displayTitle release];
-        _displayTitle = [displayTitle copy];
+        _displayTitle = [displayTitle retain];
     }
 }
 
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 5a0d8f3..55bd867 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -311,8 +311,9 @@
 - (void)addBackForwardItemWithURL: (NSURL *)url anchor: (NSString *)anchor;
 {
     WebHistoryItem *backForwardItem;
+    WebFrame *parentFrame = [[frame controller] frameForDataSource: [[frame dataSource] parent]]; 
 
-    backForwardItem = [[WebHistoryItem alloc] initWithURL:url target: [frame name] title:[[frame dataSource] pageTitle] image: nil];
+    backForwardItem = [[WebHistoryItem alloc] initWithURL:url target: [frame name] parent: [parentFrame name] title:[[frame dataSource] pageTitle] image: nil];
     [backForwardItem setAnchor: anchor];
     [[[frame controller] backForwardList] addEntry: backForwardItem];
     [backForwardItem release];
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index 9498eb0..f4e1337 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -311,9 +311,23 @@
 - (void)_goToItem: (WebHistoryItem *)item withFrameLoadType: (WebFrameLoadType)type
 {
     WebFrame *targetFrame;
+    
     targetFrame = [self frameNamed: [item target]];
     if (targetFrame == nil){
-        NSLog (@"Target frame not found, using main frame instead, will be fixed soon.\n");
+        NSLog (@"Target frame not found, using main frame instead, will be fixed soon\n");
+#if 0
+        int pos = 1;
+        WebHistoryItem *next = item;
+        while (next){
+            NSLog (@"frame name %@, parent %@\n", [next target], [next parent]);
+            nextFrame = [self frameNamed: [next parent]];
+            next = [[self backForwardList] backEntryAtIndex: pos++];
+            if ([[next target] isEqual: @"_top"]){
+                [[self mainFrame] _goToItem: next withFrameLoadType: WebFrameLoadTypeIntermediateBack];
+                return;
+            }
+        }
+#endif            
         targetFrame = [self mainFrame];
     }
     [targetFrame _goToItem: item withFrameLoadType: type];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index d4f94b1..29518ff 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -39,7 +39,8 @@ typedef enum {
     WebFrameLoadTypeIndexedBack = 4,
     WebFrameLoadTypeIndexedForward = 5,
     WebFrameLoadTypeRefresh = 6,
-    WebFrameLoadTypeInternal = 7
+    WebFrameLoadTypeInternal = 7,
+    WebFrameLoadTypeIntermediateBack = 8
 } WebFrameLoadType;
 
 #define WebFrameStateChangedNotification @"WebFrameStateChangedNotification"
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 2a8951b..7473b93 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -240,6 +240,7 @@ static const char * const stateNames[6] = {
     NSView <WebDocumentView> *documentView;
     WebHistoryItem *backForwardItem;
     WebBackForwardList *backForwardList = [[self controller] backForwardList];
+    WebFrame *parentFrame;
     
     documentView = [[self webView] documentView];
 
@@ -264,6 +265,9 @@ static const char * const stateNames[6] = {
                     [self _restoreScrollPosition];
                     break;
     
+                case WebFrameLoadTypeIntermediateBack:
+                    break;
+                    
                 case WebFrameLoadTypeBack:
                     [backForwardList goBack];
                     [self _restoreScrollPosition];
@@ -274,7 +278,8 @@ static const char * const stateNames[6] = {
                     break;
     
                 case WebFrameLoadTypeStandard:
-                    backForwardItem = [[WebHistoryItem alloc] initWithURL:[[self dataSource] inputURL] target: [self name] title:[[self dataSource] pageTitle] image: nil];
+                    parentFrame = [[self controller] frameForDataSource: [[self dataSource] parent]]; 
+                    backForwardItem = [[WebHistoryItem alloc] initWithURL:[[self dataSource] inputURL] target: [self name] parent: [parentFrame name] title:[[self dataSource] pageTitle] image: nil];
                     [[[self controller] backForwardList] addEntry: backForwardItem];
                     [backForwardItem release];
                     // Scroll to top.
@@ -448,6 +453,10 @@ static const char * const stateNames[6] = {
                         [self _restoreScrollPosition];
                         break;
         
+                    case WebFrameLoadTypeIntermediateBack:
+                        [[self controller] goBack];
+                        break;
+                        
                     case WebFrameLoadTypeBack:
                         [self _restoreScrollPosition];
                         break;
@@ -702,5 +711,4 @@ static const char * const stateNames[6] = {
 }
 
 
-
 @end
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 9498eb0..f4e1337 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -311,9 +311,23 @@
 - (void)_goToItem: (WebHistoryItem *)item withFrameLoadType: (WebFrameLoadType)type
 {
     WebFrame *targetFrame;
+    
     targetFrame = [self frameNamed: [item target]];
     if (targetFrame == nil){
-        NSLog (@"Target frame not found, using main frame instead, will be fixed soon.\n");
+        NSLog (@"Target frame not found, using main frame instead, will be fixed soon\n");
+#if 0
+        int pos = 1;
+        WebHistoryItem *next = item;
+        while (next){
+            NSLog (@"frame name %@, parent %@\n", [next target], [next parent]);
+            nextFrame = [self frameNamed: [next parent]];
+            next = [[self backForwardList] backEntryAtIndex: pos++];
+            if ([[next target] isEqual: @"_top"]){
+                [[self mainFrame] _goToItem: next withFrameLoadType: WebFrameLoadTypeIntermediateBack];
+                return;
+            }
+        }
+#endif            
         targetFrame = [self mainFrame];
     }
     [targetFrame _goToItem: item withFrameLoadType: type];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list