Summary: | -[WebFrameLoadDelegate didReceiveIcon:forFrame:] never called? | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Todd Ditchendorf <itod> | ||||||
Component: | WebKit API | Assignee: | Darin Adler <darin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Major | CC: | itod, mrowe | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.5 | ||||||||
URL: | http://ditchnet.org/WebKitFaviconTest.zip | ||||||||
Attachments: |
|
Description
Todd Ditchendorf
2007-12-04 13:23:48 PST
I tried to run your favicon test, but it doesn't seem to be working: 2007-12-04 13:45:56.517 WebKitFaviconTest[43824:813] init 2007-12-04 13:45:56.521 WebKitFaviconTest[43824:813] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (WebView) I checked a few bugs in radar and found this issue had been reported awhile ago but closed as works, fixed in September by a related change. Using a debug build of WebKit, I just set a breakpoint in _dispatchDidReceiveIconFromWebFrame in WebView.mm (which is where the delegate call is sent from) and visited a site I knew I didn't have the icon for, and the breakpoint was hit immediately. Hi Brady, thanks for trying, however, I still see the issue. First, I have updated the test case to try to fix the apparent linking problems you were experiencing. This test runs on both of my macbooks, so pretty sure it's cool now. I've also attached the test case to this issue directly. What issue from september are you referring to? thanks! Created attachment 17711 [details]
test case
Okay, I see what the problem is. The icon database - and therefore all icon loading - is disabled by default. Since icon loading is disabled, you'll never get this notification. Calling [WebIconDatabase sharedIconDatabase] is enough to instantiate the global icon database, enable it, and result in icon loads. Slapping that one-liner into your - (void)setupIconDatabase; method made it work. It really sucks that the only way to enable part of the API is to use SPI (granted, very stable SPI that's been around forever) but the alternative is to have the overhead of icon loads and multithreading for *all* WebKit apps, which is entirely unacceptable. I'm at a loss as to how to resolve this without changes to the API (or at least the documentation of the API). As we discussed, this will be simple to fix. If you implement the icon delegate method, then WebKit should call [WebIconDatabase sharedIconDatabase] for you when you attach that delegate to a WebView. Created attachment 17850 [details]
patch
Comment on attachment 17850 [details]
patch
r=me
|