[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 07:14:50 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ec3177678d8f098fac4ace16f9dce5e44798d0d9
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 14 00:29:43 2002 +0000

    WebKit:
    
    	- WebKit part of fix for 3028061 -- visiting a bookmarked site
    	that now has a site icon will not update bookmark's icon
    
    	No longer store the icon in the WebHistoryItem, since there's no
    	mechanism for keeping it fresh and telling interested clients
    	when it changes. Instead, the latest icon is always returned from
    	the icon database, and it's up to clients to get a fresh one when
    	they notice that the icon for a URL has been updated.
    
            Reviewed by Darin
    
            * History.subproj/WebHistoryItem.h:
    	remove _icon and _loadedIcon ivars
    
            * History.subproj/WebHistoryItem.m:
            (-[WebHistoryItem dealloc]):
    	don't release _icon
            (-[WebHistoryItem icon]):
    	just return fresh icon from database, don't store
            (-[WebHistoryItem setURL:]):
    	don't set _loadedIcon to NO
    
    WebBrowser:
    
    	- WebBrowser part of fix for 3028061 -- visiting a bookmarked site
    	that now has a site icon will not update bookmark's icon
    
    	This first cut, which fixes the bug completely, just tosses out
    	the cached bookmark & history menus & tells the outline view to
    	redisplay everything. We might improve this later, but in practice
    	the only difference in behavior that this will cause is to make
    	the Bookmarks menu rebuild itself from scratch when clicked on
    	more often. (We can address that multiple ways, probably the best
    	one being to make rebuilding much faster by using IconRefs instead
    	of NSImages, see 3120678.)
    
            Reviewed by Darin
    
            * BookmarksController.m:
            (-[BookmarksController awakeFromNib]):
    	register for icon-changed notifications
            (-[BookmarksController _receivedIconChangedNotification:]):
    	mark menu dirty when any icon has changed
    
            * BookmarksViewController.m:
            (-[BookmarksViewController awakeFromNib]):
    	register for icon-changed notifications
            (-[BookmarksViewController iconChanged:]):
    	reload outlineview data when any icon has changed. Note that this
    	has no effect when the outlineview is not showing.
    
            * GlobalHistory.m:
            (-[GlobalHistory _registerForHistoryNotifications]):
    	register for icon-changed notifications
            (-[GlobalHistory receivedIconChangedNotification:]):
    	mark menu dirty when any icon has changed
            (-[GlobalHistory receivedEntriesChangedNotification:]):
    	removed wayward space character
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3044 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 59ace81..affca41 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,27 @@
+2002-12-13  John Sullivan  <sullivan at apple.com>
+
+	- WebKit part of fix for 3028061 -- visiting a bookmarked site
+	that now has a site icon will not update bookmark's icon
+
+	No longer store the icon in the WebHistoryItem, since there's no
+	mechanism for keeping it fresh and telling interested clients
+	when it changes. Instead, the latest icon is always returned from
+	the icon database, and it's up to clients to get a fresh one when
+	they notice that the icon for a URL has been updated.
+
+        Reviewed by Darin
+
+        * History.subproj/WebHistoryItem.h:
+	remove _icon and _loadedIcon ivars
+
+        * History.subproj/WebHistoryItem.m:
+        (-[WebHistoryItem dealloc]):
+	don't release _icon
+        (-[WebHistoryItem icon]):
+	just return fresh icon from database, don't store
+        (-[WebHistoryItem setURL:]):
+	don't set _loadedIcon to NO
+
 === Alexander-37u1 ===
 
 2002-12-13  Darin Adler  <darin at apple.com>
diff --git a/WebKit/History.subproj/WebHistoryItem.h b/WebKit/History.subproj/WebHistoryItem.h
index 7fdce44..75da43e 100644
--- a/WebKit/History.subproj/WebHistoryItem.h
+++ b/WebKit/History.subproj/WebHistoryItem.h
@@ -18,14 +18,12 @@
     NSString *_parent;
     NSString *_title;
     NSString *_displayTitle;
-    NSImage *_icon;
     NSCalendarDate *_lastVisitedDate;
     NSPoint _scrollPoint;
     NSString *anchor;
     NSArray *_documentState;
     NSMutableArray *_subItems;
     NSMutableDictionary *pageCache;
-    BOOL _loadedIcon;
     BOOL _isTargetItem;
     BOOL _alwaysAttemptToUsePageCache;
     // info used to repost form data
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index f916956..1832b90 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -74,7 +74,6 @@
     [_parent release];
     [_title release];
     [_displayTitle release];
-    [_icon release];
     [_lastVisitedDate release];
     [anchor release];
     [_documentState release];
@@ -125,22 +124,11 @@
     return _displayTitle;
 }
 
-- (void)_setIcon:(NSImage *)newIcon
-{
-    [newIcon retain];
-    [_icon release];
-    _icon = newIcon;
-}
-
 - (NSImage *)icon
 {
-    if (!_loadedIcon) {
-        NSImage *newIcon = [[WebIconDatabase sharedIconDatabase] iconForSiteURL:[self URL] withSize:WebIconSmallSize];
-        [self _setIcon:newIcon];
-        _loadedIcon = YES;
-    }
-
-    return _icon;
+    // Always get fresh icon from database. It's a client's responsibility to watch
+    // for updates to the database if desired.
+    return [[WebIconDatabase sharedIconDatabase] iconForSiteURL:[self URL] withSize:WebIconSmallSize];
 }
 
 
@@ -156,7 +144,6 @@
         [self _retainIconInDatabase:NO];
         [_URLString release];
         _URLString = [string copy];
-        _loadedIcon = NO;
         [self _retainIconInDatabase:YES];
     }
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list