[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:06:45 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9b70c8f5bbf693960552820ee0ced368795c93b8
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 22 19:35:33 2002 +0000

    WebKit:
    
    	Added more detailed notifications on history changes.
    	All changes below are just posting the new notes at the right time.
    
            * English.lproj/StringsNotToBeLocalized.txt:
            * History.subproj/WebHistory.h:
            * History.subproj/WebHistory.m:
            (-[WebHistory _sendNotification:entries:]):
            (-[WebHistory addEntry:]):
            (-[WebHistory removeEntry:]):
            (-[WebHistory removeEntries:]):
            (-[WebHistory removeAllEntries]):
            (-[WebHistory addEntries:]):
            (-[WebHistory loadHistory]):
            * WebKit.exp:
    
    WebBrowser:
    
    	Autocomplete is working with a decent DB behind it.  We use a Patricia tree with the added
    	capability of enumerating forward from a cursor.
    
    	Things that work at this point:
    	- Anything in your history or bookmarks (except from AB or Rendezvous) is findable
    	- autocomplete DB tracks changes to history
    	- results are ordered lexographically (not fancy, but at least the shortest things are first)
    
    	Here's what's getting fixed next:
    
    	- Matching doesn't work if you type http:// or www. as part of your partial string (we only match ignoring the boilerplate).
    	- Changes to bookmarks are not reflected in the autocomplete DB
    	- Results will be ranked so the one you want is always the first one selected, like it's reading your mind.
    	- Reduce conversions from NString to NSURL to NSString to NSURL to...
    
            * BrowserWindowController.m:
            (-[BrowserWindowController windowDidLoad]):  Re-enable feature.
            * CompletionController.m:
            (leftPointsUpward):  Patricia utility function.
            (rightPointsUpward):  Patricia utility function.
            (leftmostChild):  Patricia utility function.
            (+[CompletionController _tree_create]):  Initialize the root node.
            (destroyTree):  recursively free up the tree
            (+[CompletionController _tree_destroy]):  Free the tree.
            (_bitOfString):  Patricia utility function.
            (_leftmostBitOfUnichar):  Patricia utility function.
            (_leftmostDiffBit):  Patricia utility function.
            (_stringFromKey):  Extract the string we index from an item we put in the db (calls _cookedURLString)
            (_findInsertionPoint):  Search the tree for place we would insert a node.
            (_findPotentialNode):  Search for a match in the tree.
            (+[CompletionController _tree_addItem:]):   Add an item.
            (+[CompletionController _tree_deleteItem:]):   Delete an item.
            (+[CompletionController _tree_findItem:cursor:]):   Find and item, setting cursor.
            (+[CompletionController _tree_nextItemUsingCursor:]):  Get next item.
            (+[CompletionController _tree_setCursorAtStart:]):  Set cursor (only for debug now)
            (DumpAutoCompleteTree):  Debugding dump.
            (_cookedURLString):  Strips off boilerplate like "http://www." from a URL
            (+[CompletionController _addBookmarkTree:]):  Recursively adds bookmarks to the tree.
            (+[CompletionController _loadDB]):  Adds bookmarks and history to the tree.
            (-[CompletionController _executeQuery]):  Looks up a result set given a user's partial string.
            (+[CompletionController _registerForNotifications]):  Listen for history changes.
            (+[CompletionController _historyAdded:]):  Update db on history change.
            (+[CompletionController _historyRemoved:]):  Update db on history change.
            (+[CompletionController _reloadDB:]):  Update db on history change.
            (-[CompletionController _buildUI]):  Make popdown window slightly transparent.
            (-[CompletionController _reflectSelectedRow]):  Properly add completion text to user's partial
    	text.  ("http://www." no longer hardwired)
            (-[CompletionController tableView:objectValueForTableColumn:row:]):  Handle bookmarks as
    	well as WebHistoyItems.
            * GlobalHistory.m:
            (-[GlobalHistory _registerForHistoryNotifications]):  Register for new WebHistory notifications.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2829 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 916e2bf..93c957a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2002-11-22  Trey Matteson  <trey at apple.com>
+
+	Added more detailed notifications on history changes.
+	All changes below are just posting the new notes at the right time.
+
+        * English.lproj/StringsNotToBeLocalized.txt:
+        * History.subproj/WebHistory.h:
+        * History.subproj/WebHistory.m:
+        (-[WebHistory _sendNotification:entries:]):
+        (-[WebHistory addEntry:]):
+        (-[WebHistory removeEntry:]):
+        (-[WebHistory removeEntries:]):
+        (-[WebHistory removeAllEntries]):
+        (-[WebHistory addEntries:]):
+        (-[WebHistory loadHistory]):
+        * WebKit.exp:
+
 2002-11-22  Richard Williamson   <rjw at apple.com>
 
         Changed NSString category methods to include _web_ prefix.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 916e2bf..93c957a 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,20 @@
+2002-11-22  Trey Matteson  <trey at apple.com>
+
+	Added more detailed notifications on history changes.
+	All changes below are just posting the new notes at the right time.
+
+        * English.lproj/StringsNotToBeLocalized.txt:
+        * History.subproj/WebHistory.h:
+        * History.subproj/WebHistory.m:
+        (-[WebHistory _sendNotification:entries:]):
+        (-[WebHistory addEntry:]):
+        (-[WebHistory removeEntry:]):
+        (-[WebHistory removeEntries:]):
+        (-[WebHistory removeAllEntries]):
+        (-[WebHistory addEntries:]):
+        (-[WebHistory loadHistory]):
+        * WebKit.exp:
+
 2002-11-22  Richard Williamson   <rjw at apple.com>
 
         Changed NSString category methods to include _web_ prefix.
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index 2d6b0da..5d73b6f 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -56,6 +56,7 @@
 "DirectionRLO"
 "DirectionS"
 "DirectionWS"
+"Entries"
 "GET"
 "HREF="
 "Helvetica"
@@ -110,7 +111,10 @@
 "WebFrameStateLayoutAcceptable"
 "WebFrameStateProvisional"
 "WebHTMLView"
-"WebHistoryEntriesChangedNotification"
+"WebHistoryAllEntriesRemovedNotification"
+"WebHistoryEntriesAddedNotification"
+"WebHistoryEntriesRemovedNotification"
+"WebHistoryLoadedNotification"
 "WebHostToSiteURLs"
 "WebIconDatabaseDirectory"
 "WebIconDidChangeNotification"
diff --git a/WebKit/History.subproj/WebHistory.h b/WebKit/History.subproj/WebHistory.h
index caa47c6..fa0f74a 100644
--- a/WebKit/History.subproj/WebHistory.h
+++ b/WebKit/History.subproj/WebHistory.h
@@ -14,8 +14,18 @@
 @class WebHistoryItem;
 @class WebHistoryPrivate;
 
-// notification sent when history is modified
-extern NSString *WebHistoryEntriesChangedNotification;
+// Notifications sent when history is modified.
+// The first two come with a userInfo dictionary with a single key "Entries", which contains
+// an array of entries that were added or removed.
+
+// posted from addEntry: and addEntries:
+extern NSString *WebHistoryEntriesAddedNotification;
+// posted from removeEntry: and removeEntries:
+extern NSString *WebHistoryEntriesRemovedNotification;
+// posted from removeAllEntries
+extern NSString *WebHistoryAllEntriesRemovedNotification;
+// posted from loadHistory
+extern NSString *WebHistoryLoadedNotification;
 
 /*!
     @class WebHistory
diff --git a/WebKit/History.subproj/WebHistory.m b/WebKit/History.subproj/WebHistory.m
index 6b822be..0cc9f80 100644
--- a/WebKit/History.subproj/WebHistory.m
+++ b/WebKit/History.subproj/WebHistory.m
@@ -12,7 +12,10 @@
 #import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebNSURLExtras.h>
 
-NSString *WebHistoryEntriesChangedNotification = @"WebHistoryEntriesChangedNotification";
+NSString *WebHistoryEntriesAddedNotification = @"WebHistoryEntriesAddedNotification";
+NSString *WebHistoryEntriesRemovedNotification = @"WebHistoryEntriesRemovedNotification";
+NSString *WebHistoryAllEntriesRemovedNotification = @"WebHistoryAllEntriesRemovedNotification";
+NSString *WebHistoryLoadedNotification = @"WebHistoryLoadedNotification";
 
 @implementation WebHistory
 
@@ -50,11 +53,11 @@ NSString *WebHistoryEntriesChangedNotification = @"WebHistoryEntriesChangedNotif
 
 #pragma mark MODIFYING CONTENTS
 
-- (void)sendEntriesChangedNotification
+- (void)_sendNotification:(NSString *)name entries:(NSArray *)entries
 {
+    NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:entries, @"Entries", nil];
     [[NSNotificationCenter defaultCenter]
-        postNotificationName: WebHistoryEntriesChangedNotification
-                      object: self];
+        postNotificationName: name object: self userInfo: userInfo];
 }
 
 - (WebHistoryItem *)addEntryForURL: (NSURL *)URL
@@ -69,34 +72,40 @@ NSString *WebHistoryEntriesChangedNotification = @"WebHistoryEntriesChangedNotif
 - (void)addEntry: (WebHistoryItem *)entry
 {
     [_historyPrivate addEntry: entry];
-    [self sendEntriesChangedNotification];
+    [self _sendNotification: WebHistoryEntriesAddedNotification
+                    entries: [NSArray arrayWithObject:entry]];
 }
 
 - (void)removeEntry: (WebHistoryItem *)entry
 {
     if ([_historyPrivate removeEntry: entry]) {
-        [self sendEntriesChangedNotification];
+        [self _sendNotification: WebHistoryEntriesRemovedNotification
+                        entries: [NSArray arrayWithObject:entry]];
     }
 }
 
 - (void)removeEntries: (NSArray *)entries
 {
     if ([_historyPrivate removeEntries:entries]) {
-        [self sendEntriesChangedNotification];
+        [self _sendNotification: WebHistoryEntriesRemovedNotification
+                        entries: entries];
     }
 }
 
 - (void)removeAllEntries
 {
     if ([_historyPrivate removeAllEntries]) {
-        [self sendEntriesChangedNotification];
+        [[NSNotificationCenter defaultCenter]
+            postNotificationName: WebHistoryAllEntriesRemovedNotification
+                          object: self];
     }
 }
 
 - (void)addEntries:(NSArray *)newEntries
 {
     [_historyPrivate addEntries:newEntries];
-    [self sendEntriesChangedNotification];
+    [self _sendNotification: WebHistoryEntriesAddedNotification
+                    entries: newEntries];
 }
 
 #pragma mark DATE-BASED RETRIEVAL
@@ -138,7 +147,9 @@ NSString *WebHistoryEntriesChangedNotification = @"WebHistoryEntriesChangedNotif
 - (BOOL)loadHistory
 {
     if ([_historyPrivate loadHistory]) {
-        [self sendEntriesChangedNotification];
+        [[NSNotificationCenter defaultCenter]
+            postNotificationName: WebHistoryLoadedNotification
+                          object: self];
         return YES;
     }
     return NO;
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index c026e52..fee4c3c 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -33,7 +33,10 @@ _WebElementLinkTargetFrameKey
 _WebElementLinkURLKey
 _WebElementStringKey
 _WebErrorDomainWebKit
-_WebHistoryEntriesChangedNotification
+_WebHistoryEntriesAddedNotification
+_WebHistoryEntriesRemovedNotification
+_WebHistoryAllEntriesRemovedNotification
+_WebHistoryLoadedNotification
 _WebIconDidChangeNotification
 _WebIconLargeSize
 _WebIconMediumSize

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list