I am having trouble using the IconDatabase successfully. I was wondering if I am either using it incorrectly or if Safari is doing some extra work to get the correct favicon for a given site.

Here is the scenario. I am going to assume that each icon is retained at least once so that icons are never deleted (in fact, for testing this is exactly what I'm doing).

Load www.google.com, FrameLoaderClient::dispatchDidReceiveIcon is called. IconDatabase::iconForPageURL returns an icon, this is perfect. Load www.google.com/search?hl=en&q=some_query&btnG=Google +Search, dispatchDidReceiveIcon is *not* called. If I call iconForPageURL *before* the load is finished, I won't get an icon unless I have already visited the site. If I call it after the load has finished, this could potentially show the wrong icon until the load has finished.

Here is the behavior that I want:
Load www.google.com, show the default icon until the google favicon is loaded and dispatchDidReceiveIcon is called. Load www.google.com/ search?hl=whatever, show the google favicon unless dispatchDidReceiveIcon is called. Load www.someothersite.com, show the default icon until dispatchDidReceiveIcon is called. How can I accomplish this behavior when the IconDatabase doesn't know about pageUrls->iconUrls until *after* the load has completed?

Thanks,
Patrick
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to