Bug 64015 - IconDatabase::synchronousIconForPageURL() has inconsistent API when no custom icon is available
Summary: IconDatabase::synchronousIconForPageURL() has inconsistent API when no custom...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: John Sullivan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-07-06 12:48 PDT by John Sullivan
Modified: 2011-07-06 13:29 PDT (History)
1 user (show)

See Also:


Attachments
Patch to return 0 in all cases for which there is no custom icon (902 bytes, patch)
2011-07-06 12:54 PDT, John Sullivan
sullivan: review-
Details | Formatted Diff | Diff
Patch to return 0 in all cases where there is no custom icon (now with ChangeLog) (1.39 KB, patch)
2011-07-06 12:58 PDT, John Sullivan
sullivan: review-
Details | Formatted Diff | Diff
Patch to always return 0 if there's no custom icon (now with correctly-styled ChangeLog!) (1.45 KB, patch)
2011-07-06 13:00 PDT, John Sullivan
adachan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Sullivan 2011-07-06 12:48:44 PDT
IconDatabase::synchronousIconForPageURL() returns 0 for some URLs that don't have custom icons (http/https ones), but instead returns the default icon (at a particular image size) for other URLs that don't have custom icons (anything other than http/https). This inconsistency makes it impossible to use the return value to know whether the page has a custom icon, or to use any client-specific default icon.

In Radar as <rdar://problem/9706277>.
Comment 1 John Sullivan 2011-07-06 12:54:52 PDT
Created attachment 99862 [details]
Patch to return 0 in all cases for which there is no custom icon
Comment 2 John Sullivan 2011-07-06 12:55:12 PDT
Oops, forgot the ChangeLog. Will resubmit.
Comment 3 John Sullivan 2011-07-06 12:58:22 PDT
Created attachment 99864 [details]
Patch to return 0 in all cases where there is no custom icon (now with ChangeLog)
Comment 4 John Sullivan 2011-07-06 12:59:31 PDT
Oops, neglected to add bugzilla URL to ChangeLog. Third time's a charm!
Comment 5 WebKit Review Bot 2011-07-06 13:00:02 PDT
Attachment 99864 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 John Sullivan 2011-07-06 13:00:10 PDT
Created attachment 99866 [details]
Patch to always return 0 if there's no custom icon (now with correctly-styled ChangeLog!)
Comment 7 John Sullivan 2011-07-06 13:29:17 PDT
Fixed in http://trac.webkit.org/changeset/90486