Changeset 28718

Show
Ignore:
Timestamp:
2007-12-14 12:25:33 (9 months ago)
Author:
darin@apple.com
Message:

WebKit/mac:

Reviewed by Brady.

  • WebView/WebView.mm: (-setFrameLoadDelegate:): Call sharedIconDatabase if the a didReceiveIcon method is present.

WebKitTools:

  • DumpRenderTree/mac/FrameLoadDelegate.mm: Don't implement didReceiveIcon delegate method since it now triggers unwanted icon loading. We only had it because we implemented "all" delegate methods here.
Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r28717 r28718  
     12007-12-14  Darin Adler  <darin@apple.com> 
     2 
     3        Reviewed by Brady. 
     4 
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=16296 
     6          <rdar://problem/5635641> -[WebFrameLoadDelegate didReceiveIcon:forFrame:] never called 
     7 
     8        * WebView/WebView.mm: 
     9        (-[WebView setFrameLoadDelegate:]): Call [WebIconDatabase sharedIconDatabase] if the 
     10        a didReceiveIcon method is present. 
     11 
    1122007-12-14  Darin Adler  <darin@apple.com> 
    213 
  • trunk/WebKit/mac/WebView/WebView.mm

    r28693 r28718  
    21392139    _private->frameLoadDelegate = delegate; 
    21402140    [self _cacheFrameLoadDelegateImplementations]; 
     2141 
     2142    // If this delegate wants callbacks for icons, fire up the icon database. 
     2143    if (_private->frameLoadDelegateImplementations.didReceiveIconForFrameFunc) 
     2144        [WebIconDatabase sharedIconDatabase]; 
    21412145} 
    21422146 
     
    40554059    [self _registerForIconNotification:NO]; 
    40564060 
    4057     WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(self); 
    4058     if (implementations->didReceiveIconForFrameFunc) { 
     4061    WebFrameLoadDelegateImplementationCache* cache = &_private->frameLoadDelegateImplementations; 
     4062    if (cache->didReceiveIconForFrameFunc) { 
    40594063        Image* image = iconDatabase()->iconForPageURL(core(webFrame)->loader()->url().string(), IntSize(16, 16)); 
    40604064        if (NSImage *icon = webGetNSImage(image, NSMakeSize(16, 16))) 
    4061             CallFrameLoadDelegate(implementations->didReceiveIconForFrameFunc, self, @selector(webView:didReceiveIcon:forFrame:), icon, webFrame); 
     4065            CallFrameLoadDelegate(cache->didReceiveIconForFrameFunc, self, @selector(webView:didReceiveIcon:forFrame:), icon, webFrame); 
    40624066    } 
    40634067 
  • trunk/WebKitTools/ChangeLog

    r28715 r28718  
     12007-12-14  Darin Adler  <darin@apple.com> 
     2 
     3        * DumpRenderTree/mac/FrameLoadDelegate.mm: Don't implement didReceiveIcon delegate method 
     4        since it now triggers unwanted icon loading. We only had it because we implemented "all" 
     5        delegate methods here. 
     6 
    172007-12-14  Anders Carlsson  <andersca@apple.com> 
    28 
  • trunk/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm

    r28030 r28718  
    296296} 
    297297 
    298 - (void)webView:(WebView *)sender didReceiveIcon:(NSImage *)image forFrame:(WebFrame *)frame 
    299 { 
    300     if (!done && layoutTestController->dumpFrameLoadCallbacks()) { 
    301         NSString *string = [NSString stringWithFormat:@"%@ - didReceiveIconForFrame", [frame _drt_descriptionSuitableForTestResult]]; 
    302         printf ("%s\n", [string UTF8String]); 
    303     } 
    304 } 
    305  
    306298- (void)webView:(WebView *)sender didChangeLocationWithinPageForFrame:(WebFrame *)frame 
    307299{