Changeset 25557 in webkit
- Timestamp:
- Sep 13, 2007 6:46:54 PM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r25553 r25557 1 2007-09-13 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Maciej 4 5 <rdar://problem/5480437> - No site icon at launch and related error messages 6 7 The error message was actually indicative of a larger bug that might've resulted in icons getting 8 improperly pruned because they were never added to the set of retained page URLs. 9 10 To solve the no-icon-at-launch problem, we send the "didReceiveIcon:" delegate call for every page 11 load that has an icon, whether the icon comes in from network, from disk, or was already in ram 12 13 * loader/FrameLoader.cpp: 14 (WebCore::FrameLoader::startIconLoader): Always send the didReceiveIcon delegate call when an icon's 15 image data is known 16 17 * loader/icon/IconDatabase.cpp: 18 (WebCore::IconDatabase::retainIconForPageURL): Much more accurately track the set of retained pages by 19 adding them when their retain count moves from 0 to 1 20 21 * loader/icon/PageURLRecord.h: 22 (WebCore::PageURLRecord::retain): Correctly distinguish the "retain count just went from 0 to 1" case 23 in the return value 24 1 25 2007-09-13 Brady Eidson <beidson@apple.com> 2 26 -
trunk/WebCore/loader/FrameLoader.cpp
r25547 r25557 1062 1062 // If the icon data hasn't been read in from disk yet, kick off the read of the icon from the database to make sure someone 1063 1063 // has done it. This is after registering for the notification so the WebView can call the appropriate delegate method. 1064 // Otherwise if the icon data *is* available, and this icon load was previously deferred, we need to notifiy the delegate1064 // Otherwise if the icon data *is* available, notify the delegate 1065 1065 if (!iconDatabase()->iconDataKnownForIconURL(urlString)) { 1066 1066 LOG(IconDatabase, "Told not to load icon %s but icon data is not yet available - registering for notification and requesting load from disk", urlString.ascii().data()); … … 1068 1068 iconDatabase()->iconForPageURL(m_URL.url(), IntSize(0, 0)); 1069 1069 iconDatabase()->iconForPageURL(originalRequestURL().url(), IntSize(0, 0)); 1070 } else if (m_mayLoadIconLater)1070 } else 1071 1071 m_client->dispatchDidReceiveIcon(); 1072 1072 -
trunk/WebCore/loader/icon/IconDatabase.cpp
r25553 r25557 441 441 record = new PageURLRecord(pageURL); 442 442 m_pageURLToRecordMap.set(pageURL, record); 443 } 444 445 if (!record->retain()) { 446 if (pageURL.isNull()) 447 pageURL = pageURLOriginal.copy(); 448 449 // This page just had its retain count bumped from 0 to 1 - Record that fact 443 450 m_retainedPageURLs.add(pageURL); 444 } 445 446 if (record->retain()) { 451 447 452 // If we read the iconURLs yet, we want to avoid any pageURL->iconURL lookups and the pageURLsPendingDeletion is moot, 448 453 // so we bail here and skip those steps … … 453 458 // If this pageURL waiting to be sync'ed, update the sync record 454 459 // This saves us in the case where a page was ready to be deleted from the database but was just retained - so theres no need to delete it! 455 if (!m_privateBrowsingEnabled && m_pageURLsPendingSync.contains(pageURLOriginal)) { 456 if (pageURL.isNull()) 457 pageURL = pageURLOriginal.copy(); 458 460 if (!m_privateBrowsingEnabled && m_pageURLsPendingSync.contains(pageURL)) { 459 461 LOG(IconDatabase, "Bringing %s back from the brink", pageURL.utf8().data()); 460 462 m_pageURLsPendingSync.set(pageURL, record->snapshot()); -
trunk/WebCore/loader/icon/PageURLRecord.h
r25454 r25557 63 63 PageURLSnapshot snapshot(bool forDeletion = false) const; 64 64 65 inline bool retain() { return ++m_retainCount; } 65 // Returns false if the page wasn't retained beforehand, true if the retain count was already 1 or higher 66 inline bool retain() { return m_retainCount++; } 66 67 68 // Returns true if the page is still retained after the call. False if the retain count just dropped to 0 67 69 inline bool release() 68 70 {
Note: See TracChangeset
for help on using the changeset viewer.