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

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:55:27 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 79fc776959482febd3df4667ee83b7130d7069ea
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Feb 9 01:10:33 2002 +0000

    	Changed back & forward to goBack and goForward and made them not return
    	a value (so signatures match those in WebBrowser). Added backEntry and
    	forwardEntry that don't alter the list. These will be needed to ask to
    	go to the URL at the back position without altering the back list until
    	the change is committed.
    
    	* History.subproj/IFBackForwardList.h:
    	* History.subproj/IFBackForwardList.m: (-[IFBackForwardList goBack]),
    	(-[IFBackForwardList backEntry]), (-[IFBackForwardList currentEntry]),
    	(-[IFBackForwardList forwardEntry]), (-[IFBackForwardList goForward]):
    
    
    	* BrowserDocument.m: (-[BrowserDocument goBack]), (-[BrowserDocument goForward]):
    	Updated to match new API from IFBackForwardList. Behavior is unchanged for now.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@608 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 4b355ab..3118ee6 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2002-02-08  John Sullivan  <sullivan at apple.com>
+
+	Changed back & forward to goBack and goForward and made them not return
+	a value (so signatures match those in WebBrowser). Added backEntry and
+	forwardEntry that don't alter the list. These will be needed to ask to
+	go to the URL at the back position without altering the back list until
+	the change is committed.
+
+	* History.subproj/IFBackForwardList.h:
+	* History.subproj/IFBackForwardList.m: (-[IFBackForwardList goBack]),
+	(-[IFBackForwardList backEntry]), (-[IFBackForwardList currentEntry]),
+	(-[IFBackForwardList forwardEntry]), (-[IFBackForwardList goForward]):
+
 2002-02-07  Richard Williamson  <rjw at apple.com>
     
     More changes to IFLocationChangeHandler API.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 4b355ab..3118ee6 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-02-08  John Sullivan  <sullivan at apple.com>
+
+	Changed back & forward to goBack and goForward and made them not return
+	a value (so signatures match those in WebBrowser). Added backEntry and
+	forwardEntry that don't alter the list. These will be needed to ask to
+	go to the URL at the back position without altering the back list until
+	the change is committed.
+
+	* History.subproj/IFBackForwardList.h:
+	* History.subproj/IFBackForwardList.m: (-[IFBackForwardList goBack]),
+	(-[IFBackForwardList backEntry]), (-[IFBackForwardList currentEntry]),
+	(-[IFBackForwardList forwardEntry]), (-[IFBackForwardList goForward]):
+
 2002-02-07  Richard Williamson  <rjw at apple.com>
     
     More changes to IFLocationChangeHandler API.
diff --git a/WebKit/History.subproj/IFBackForwardList.h b/WebKit/History.subproj/IFBackForwardList.h
index cdbdea8..1b97e41 100644
--- a/WebKit/History.subproj/IFBackForwardList.h
+++ b/WebKit/History.subproj/IFBackForwardList.h
@@ -15,16 +15,23 @@
 
 -(id)init;
 
+// add to the list
 -(void)addEntry:(IFURIEntry *)entry;
 
--(IFURIEntry *)back;
--(IFURIEntry *)forward;
+// change position in the list
+-(void)goBack;
+-(void)goForward;
 
+// examine entries without changing position
+-(IFURIEntry *)backEntry;
 -(IFURIEntry *)currentEntry;
+-(IFURIEntry *)forwardEntry;
 
+// examine entire list
 -(NSArray *)backList;
 -(NSArray *)forwardList;
 
+// check whether entries exist
 -(BOOL)canGoBack;
 -(BOOL)canGoForward;
 
diff --git a/WebKit/History.subproj/IFBackForwardList.m b/WebKit/History.subproj/IFBackForwardList.m
index 4cfe2ee..fabd556 100644
--- a/WebKit/History.subproj/IFBackForwardList.m
+++ b/WebKit/History.subproj/IFBackForwardList.m
@@ -44,13 +44,25 @@
     [mutex unlock];
 }
 
--(IFURIEntry *)back
+-(void)goBack
+{
+    [mutex lock];
+    index++;
+    [mutex unlock];
+}
+
+-(IFURIEntry *)backEntry
 {
     IFURIEntry *result;
+    int count;
     
     [mutex lock];
-    index++;
-    result = [uriList entryAtIndex:index];
+    count = [uriList count];
+    if (count > 1 && index < (count - 1)) {
+        result = [uriList entryAtIndex:index+1];
+    } else {
+        result = nil;
+    }
     [mutex unlock];
 
     return result;
@@ -58,21 +70,37 @@
 
 -(IFURIEntry *)currentEntry
 {
-    return [uriList entryAtIndex:index];
+    IFURIEntry *result;
+    
+    [mutex lock];
+    result = [uriList entryAtIndex:index];
+    [mutex unlock];
+
+    return result;
 }
 
--(IFURIEntry *)forward
+-(IFURIEntry *)forwardEntry
 {
     IFURIEntry *result;
 
     [mutex lock];
-    index--;
-    result = [uriList entryAtIndex:index];
+    if (index > 0) {
+        result = [uriList entryAtIndex:index-1];
+    } else {
+        result = nil;
+    }
     [mutex unlock];
-    
+
     return result;
 }
 
+-(void)goForward
+{
+    [mutex lock];
+    index--;
+    [mutex unlock];
+}
+
 -(BOOL)canGoBack
 {
     BOOL result;
diff --git a/WebKit/History.subproj/WebBackForwardList.h b/WebKit/History.subproj/WebBackForwardList.h
index cdbdea8..1b97e41 100644
--- a/WebKit/History.subproj/WebBackForwardList.h
+++ b/WebKit/History.subproj/WebBackForwardList.h
@@ -15,16 +15,23 @@
 
 -(id)init;
 
+// add to the list
 -(void)addEntry:(IFURIEntry *)entry;
 
--(IFURIEntry *)back;
--(IFURIEntry *)forward;
+// change position in the list
+-(void)goBack;
+-(void)goForward;
 
+// examine entries without changing position
+-(IFURIEntry *)backEntry;
 -(IFURIEntry *)currentEntry;
+-(IFURIEntry *)forwardEntry;
 
+// examine entire list
 -(NSArray *)backList;
 -(NSArray *)forwardList;
 
+// check whether entries exist
 -(BOOL)canGoBack;
 -(BOOL)canGoForward;
 
diff --git a/WebKit/History.subproj/WebBackForwardList.m b/WebKit/History.subproj/WebBackForwardList.m
index 4cfe2ee..fabd556 100644
--- a/WebKit/History.subproj/WebBackForwardList.m
+++ b/WebKit/History.subproj/WebBackForwardList.m
@@ -44,13 +44,25 @@
     [mutex unlock];
 }
 
--(IFURIEntry *)back
+-(void)goBack
+{
+    [mutex lock];
+    index++;
+    [mutex unlock];
+}
+
+-(IFURIEntry *)backEntry
 {
     IFURIEntry *result;
+    int count;
     
     [mutex lock];
-    index++;
-    result = [uriList entryAtIndex:index];
+    count = [uriList count];
+    if (count > 1 && index < (count - 1)) {
+        result = [uriList entryAtIndex:index+1];
+    } else {
+        result = nil;
+    }
     [mutex unlock];
 
     return result;
@@ -58,21 +70,37 @@
 
 -(IFURIEntry *)currentEntry
 {
-    return [uriList entryAtIndex:index];
+    IFURIEntry *result;
+    
+    [mutex lock];
+    result = [uriList entryAtIndex:index];
+    [mutex unlock];
+
+    return result;
 }
 
--(IFURIEntry *)forward
+-(IFURIEntry *)forwardEntry
 {
     IFURIEntry *result;
 
     [mutex lock];
-    index--;
-    result = [uriList entryAtIndex:index];
+    if (index > 0) {
+        result = [uriList entryAtIndex:index-1];
+    } else {
+        result = nil;
+    }
     [mutex unlock];
-    
+
     return result;
 }
 
+-(void)goForward
+{
+    [mutex lock];
+    index--;
+    [mutex unlock];
+}
+
 -(BOOL)canGoBack
 {
     BOOL result;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list