Timeline
Sep 9, 2007:
- 9:56 PM Changeset in webkit [25465] by
-
- 1 edit2 moves in trunk/LayoutTests
Disable more occasionally failing tests.
- http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html: Removed.
- http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html.
- http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html: Removed.
- http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html.
- 8:32 PM Changeset in webkit [25464] by
-
- 3 edits in trunk/WebCore
Reviewed by Maciej Stachowiak.
http://bugs.webkit.org/show_bug.cgi?id=15148
Bug 15148: Poor performance on crazy DOM raytracer
Switch data structures to avoid quadratic behavior.
- rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): Update for ListHashSet (WebCore::RenderBlock::markPositionedObjectsForLayout): Update for ListHashSet (WebCore::RenderBlock::insertPositionedObject): Use ListHashSet to avoid expensive uniqueing (WebCore::RenderBlock::removePositionedObject): Update for ListHashSet (WebCore::RenderBlock::removePositionedObjects): Update for ListHashSet (WebCore::RenderBlock::lowestPosition): Update for ListHashSet (WebCore::RenderBlock::rightmostPosition): Update for ListHashSet (WebCore::RenderBlock::leftmostPosition): Update for ListHashSet (WebCore::RenderBlock::rightBottom): Update for ListHashSet
- rendering/RenderBlock.h: Change m_positionedObjects from DeprecatedPtrList to ListHashSet
- 7:08 PM Changeset in webkit [25463] by
-
- 2 edits in trunk/WebCore
Rubberstamped by Darin
pthread_main_np() is a Darwin thing, not a Mac thing
- loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::IconDatabase):
- 5:05 PM Changeset in webkit [25462] by
-
- 5 edits in trunk
WebKitTools:
Reviewed by Mark Rowe.
Remove 'objC' prefix from methods now in the ObjCController.
- DumpRenderTree/ObjCController.m: (+[ObjCController isSelectorExcludedFromWebScript:]): (+[ObjCController webScriptNameForSelector:]): (-[ObjCController classNameOf:]): (-[ObjCController objectOfClass:]): (-[ObjCController identityIsEqual::]): (-[ObjCController longLongRoundTrip:]): (-[ObjCController unsignedLongLongRoundTrip:]):
LayoutTests:
Reviewed by Mark Rowe.
Update tests now that the 'objC' prefix is no longer used for methods of the ObjCController.
- fast/dom/wrapper-classes.html:
- platform/mac/fast/objc/longlongTest.html:
- 4:48 PM Known incompatibilities between open-source WebKit and Safari edited by
- (diff)
- 4:48 PM Known incompatibilities between open-source WebKit and Safari edited by
- (diff)
- 4:41 PM Changeset in webkit [25461] by
-
- 10 edits4 adds in trunk
WebKitTools:
Reviewed by Oliver.
Initial refactor of DumpRenderTree in preparation of making it more platform independent.
- Move LayoutTestController into its own file.
- Move Objective-C only functions on LayoutTestController into a new controller called the ObjCController.
- DumpRenderTree/DumpRenderTree.h:
- DumpRenderTree/DumpRenderTree.m: (displayWebView):
- DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
- DumpRenderTree/FrameLoadDelegate.m: (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
- DumpRenderTree/LayoutTestController.h: Added.
- DumpRenderTree/LayoutTestController.m: Added. (+[LayoutTestController isSelectorExcludedFromWebScript:]): (+[LayoutTestController webScriptNameForSelector:]): (-[LayoutTestController clearBackForwardList]): (-[LayoutTestController setUseDashboardCompatibilityMode:]): (-[LayoutTestController setCloseRemainingWindowsWhenComplete:]): (-[LayoutTestController setCustomPolicyDelegate:]): (-[LayoutTestController keepWebHistory]): (-[LayoutTestController setCallCloseOnWebViews:]): (-[LayoutTestController setCanOpenWindows]): (-[LayoutTestController waitUntilDone]): (-[LayoutTestController waitUntilDoneWatchdogFired]): (-[LayoutTestController notifyDone]): (-[LayoutTestController dumpAsText]): (-[LayoutTestController addFileToPasteboardOnDrag]): (-[LayoutTestController addDisallowedURL:]): (-[LayoutTestController setUserStyleSheetLocation:]): (-[LayoutTestController setUserStyleSheetEnabled:]): (-[LayoutTestController dumpDOMAsWebArchive]): (-[LayoutTestController dumpSourceAsWebArchive]): (-[LayoutTestController dumpSelectionRect]): (-[LayoutTestController dumpTitleChanges]): (-[LayoutTestController dumpBackForwardList]): (-[LayoutTestController windowCount]): (-[LayoutTestController dumpChildFrameScrollPositions]): (-[LayoutTestController dumpChildFramesAsText]): (-[LayoutTestController dumpEditingCallbacks]): (-[LayoutTestController dumpResourceLoadCallbacks]): (-[LayoutTestController dumpFrameLoadCallbacks]): (-[LayoutTestController setWindowIsKey:]): (-[LayoutTestController setMainFrameIsFirstResponder:]): (-[LayoutTestController display]): (-[LayoutTestController testRepaint]): (-[LayoutTestController repaintSweepHorizontally]): (-[LayoutTestController invokeUndefinedMethodFromWebScript:withArguments:]): (-[LayoutTestController _addWorkForTarget:selector:arg1:arg2:]): (-[LayoutTestController _doLoad:target:]): (-[LayoutTestController _doBackOrForwardNavigation:]): (-[LayoutTestController queueBackNavigation:]): (-[LayoutTestController queueForwardNavigation:]): (-[LayoutTestController queueReload]): (-[LayoutTestController queueScript:]): (-[LayoutTestController queueLoad:target:]): (-[LayoutTestController setAcceptsEditing:]): (-[LayoutTestController setTabKeyCyclesThroughElements:]): (-[LayoutTestController storeWebScriptObject:]): (-[LayoutTestController accessStoredWebScriptObject]): (-[LayoutTestController dealloc]): (-[LayoutTestController decodeHostName:]): (-[LayoutTestController encodeHostName:]):
- DumpRenderTree/ObjCController.h: Added.
- DumpRenderTree/ObjCController.m: Added. (+[ObjCController isSelectorExcludedFromWebScript:]): (+[ObjCController webScriptNameForSelector:]): (-[ObjCController objCClassNameOf:]): (-[ObjCController objCObjectOfClass:]): (-[ObjCController objCIdentityIsEqual::]): (-[ObjCController objCLongLongRoundTrip:]): (-[ObjCController objCUnsignedLongLongRoundTrip:]): (-[ObjCController testWrapperRoundTripping:]):
LayoutTests:
Reviewed by Oliver.
Change objective-c tests to use the new ObjCController.
- fast/dom/Window/window-properties.html:
- fast/dom/wrapper-classes.html:
- platform/mac/fast/dom/wrapper-round-tripping.html:
- platform/mac/fast/objc/longlongTest.html:
- 4:34 PM Known incompatibilities between open-source WebKit and Safari edited by
- Added comment about icon db not working fully with current released Safaris (diff)
- 3:54 PM Changeset in webkit [25460] by
-
- 13 edits24 adds in branches/feature-branch
Reviewed by Oliver.
Rework <pattern> support to take overflow & viewBox into account.
Also fix all possible combinations of patternUnits/patternContentUnits, tested by several batik testcases.
Fixes: http://bugs.webkit.org/show_bug.cgi?id=12221 (Webkit ToT fails to render this pattern example)
- 6:23 AM Changeset in webkit [25459] by
-
- 2 edits in trunk/WebCore
2007-09-09 Holger Hans Peter Freyther <zecke@selfish.org>
Build fix for Gtk+ by adding WebCore::callOnMainThread to the TemporaryLinkStubs.
- platform/gdk/TemporaryLinkStubs.cpp: (WebCore::callOnMainThread):
- 12:11 AM Changeset in webkit [25458] by
-
- 1 edit3 moves in trunk/LayoutTests
Rubber-stamped by Oliver.
Disable occasionally failing tests until the reason for their failure can be determined.
- http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html: Removed.
- http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html.
- http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change.html: Removed.
- http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change.html.
- http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe.html: Removed.
- http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe.html.
Sep 8, 2007:
- 10:31 PM Changeset in webkit [25457] by
-
- 1 edit in trunk/WebCore/WebCore.pro
missed file in previous checkin
- 10:14 PM Changeset in webkit [25456] by
-
- 2 edits2 adds in trunk/WebCore
implement a couple of FileSystem functions and stub out the new thread function
for future implementation
- 8:13 PM Changeset in webkit [25455] by
-
- 4 edits in trunk
2007-09-08 Mark Rowe <mrowe@apple.com>
Build fix for when ENABLE(ICONDATABASE) is not set.
- loader/icon/IconDatabaseNone.cpp: (WebCore::IconDatabase::~IconDatabase):
2007-09-08 Mark Rowe <mrowe@apple.com>
Qt build fix. Move stub method implementations to the right class.
- WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::didPerformFirstNavigation):
- 7:50 PM Changeset in webkit [25454] by
-
- 4 edits in trunk/WebCore
2007-09-08 Mark Rowe <mrowe@apple.com>
More fixes for the Qt and Gtk builds.
- WebCore.pro: Update for file changes.
- loader/icon/IconDatabase.cpp: Include errno.h for EDEADLK.
- loader/icon/PageURLRecord.h:
- 5:22 PM Changeset in webkit [25453] by
-
- 4 edits2 adds2 deletes in trunk
WebCore:
Backing my change back in without the changes to VisiblePosition::next
and previous that weren't necessary to fix the bug and were causing some
layout test failures. Most of the failures appeared to be fixes but I
want more time to investigate and have to move to on to another task.
- editing/Selection.cpp: (WebCore::Selection::validate):
- editing/visible_units.cpp: (WebCore::endOfWord):
LayoutTests:
Re-enabling these tests.
- editing/selection/5057506-2.html: Added.
- editing/selection/5057506-2.html-disabled: Removed.
- editing/selection/5057506.html: Added.
- editing/selection/5057506.html-disabled: Removed.
- 4:15 PM Changeset in webkit [25452] by
-
- 2 edits in trunk/WebCore
Reviewed by Mark Rowe
Fix the _NSAutoreleaseNoPool() errors on launch - We were using NSFileManager on the secondary
thread with no NSAutoreleasePool in place
- loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::iconDatabaseSyncThread):
- 3:45 PM Changeset in webkit [25451] by
-
- 3 edits in trunk/WebCore
Add fix to the correct file.
- loader/icon/SQLDatabase.h:
- loader/icon/SQLStatement.h:
- 3:25 PM Changeset in webkit [25450] by
-
- 2 edits in trunk/WebCore
Fix Windows build.
- loader/icon/SQLStatement.h: Disable boolean conversion warning.
- 2:45 PM Changeset in webkit [25449] by
-
- 1 copy in tags/Safari-4523.5
New tag.
- 2:44 PM Changeset in webkit [25448] by
-
- 2 edits in trunk/WebKitQt
YABF (Yet Another Build Fix)
- Api/qwebsettings.cpp: (QWebSettings::iconDatabaseEnabled):
- 2:35 PM Changeset in webkit [25447] by
-
- 3 edits in trunk/WebKit/gtk
Better build fix
- WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::registerForIconNotification):
- WebCoreSupport/FrameLoaderClientGtk.h:
- 2:30 PM Changeset in webkit [25446] by
-
- 3 edits in trunk/WebKitQt
Better build fix
- WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClient::registerForIconNotification):
- WebCoreSupport/FrameLoaderClientQt.h:
- 2:24 PM Changeset in webkit [25445] by
-
- 3 edits in trunk/WebKit/gtk
Build fix
- WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::registerForIconNotification):
- WebCoreSupport/FrameLoaderClientGtk.h:
- 2:19 PM Changeset in webkit [25444] by
-
- 3 edits in trunk/WebKitQt
Build fix
- WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClient::registerForIconNotification):
- WebCoreSupport/FrameLoaderClientQt.h:
- 2:09 PM Changeset in webkit [25443] by
-
- 2 edits in trunk/WebCore
Build fix for non-Mac platforms that use Icon Database
- loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::IconDatabase): Apparently only Mac has the beauty that is pthread_main_np()
- 1:58 PM Changeset in webkit [25442] by
-
- 4 edits in trunk
Versioning.
- 1:57 PM Changeset in webkit [25441] by
-
- 1 copy in tags/Safari-5523.5
New tag.
- 1:48 PM Changeset in webkit [25440] by
-
- 2 edits in trunk/WebCore
2007-09-08 Mark Rowe <mrowe@apple.com>
Build fix.
- WebCore.xcodeproj/project.pbxproj: Headers used up in WebKit need to be be "private" rather than "project".
- 1:33 PM Changeset in webkit [25439] by
-
- 28 edits9 adds2 deletes in trunk
WebCore:
Reviewed by Darin
<rdar://problem/5434431> - Asynchronous Icon Database
The IconDatabase API was originally designed to be fully asynchronous - if an icon wasn't read in from disk
when you asked for it, you would be notified when it was.
Safari 2 did writes on a background thread, but reads blocked the main thread.
The current WebCore implementation using SQLite attempted to get rid of the background thread by defering expensive
writes via timers, but falls short in moderate to extreme usage cases
Time to make the IconDatabase live up to it's fully asynchronous destiny.
This should -
- Make the browser instantly usable while converting Safari 2 icons in the background occurs
- Remedy any UI slowness/blocking when on slow network home directories
- Remedy random UI slowness, pauses, and stutters do to random I/O occurring at the exact wrong time or under heavy disk usage from swapping or other apps on the system
- Allow certain long-running procedures to be interruptible (Safari 2 import, reading icons in from disk when trying to quit, etc)
This will have a noticeable effect on current Safari 2 and Safari 3 beta browsers, including icons not appearing in bookmarks, history,
or the location field the first time they're asked for, as current released Safari's don't properly listen for these async notifations.
The second time such a menu or view is brought up, the icon should be there.
Additionally this includes a SQLite schema change which will be a lot more efficient but will result in the loss of current SQLite icons.
Converting from Safari 2 style icons will still work.
WebCore, welcome to multi-threadedness
- WebCore.exp:
- WebCore.xcodeproj/project.pbxproj:
- WebCore.vcproj/WebCore.vcproj:
- loader/DocumentLoader.cpp: (WebCore::DocumentLoader::iconLoadDecisionAvailable): Called when an Icon becomes available that was requested by this DocumentLoader (to support the webView:didReceiveIcon: delegate call in WebKit)
- loader/DocumentLoader.h:
- loader/FrameLoader.cpp: (WebCore::FrameLoader::iconLoadDecisionAvailable): Called from the DocumentLoaders who get notified - if the FrameLoader ends up not caring because the WebView has transitioned to a new page, nothing occurs. Otherwise, the FrameLoader possibly starts it Icon Loader and possibly sends the webView:didReceiveIcon: delegate call (WebCore::FrameLoader::startIconLoader): Instead of "Yes, load the icon now" or "No, don't load it" there is a third possibility - "You might be asked to load your icon later." Add supporting logic for receiving this state, and being called a second time when the load decision is finally available.
- loader/FrameLoader.h:
- loader/FrameLoaderClient.h: Added "registerForIconNotification" which is a way to tell WebViews "The icon you are interested in might become available via the generic WebIconDatabaseDidAddIconNotification instead of a targeted delegate call" A WebView can then receive the generic notification and pass on it's own targeted delegate call.
- loader/icon/IconDataCache.cpp: Removed.
- loader/icon/IconDataCache.h: Removed.
- loader/icon/IconDatabase.cpp: (WebCore::urlForLogging): Cut a URL down in length for sane logging and debugging (WebCore::defaultClient): Return the default, empty IconDatabaseClient incase the API doesn't set one.
Following block of methods are for the Main thread's usage -
(WebCore::IconDatabase::setClient):
(WebCore::makeAllDirectories): Small optimization that checks to see if the entire path exists already, and doesn't try to loop
through each patch component if the full path is already present
(WebCore::IconDatabase::open): Makes all directories to the target path and kicks off the background thread - nothing more.
(WebCore::IconDatabase::close): Signals the thread to quit and waits for it to do so
(WebCore::IconDatabase::removeAllIcons): Purge the icon database
(WebCore::IconDatabase::iconForPageURL):
(WebCore::IconDatabase::readIconForPageURLFromDisk):
(WebCore::IconDatabase::iconURLForPageURL):
(WebCore::IconDatabase::defaultIcon):
(WebCore::IconDatabase::retainIconForPageURL):
(WebCore::IconDatabase::releaseIconForPageURL):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::setIconURLForPageURL):
(WebCore::IconDatabase::loadDecisionForIconURL): Determine if an icon loader should load now. If the decision is "maybe later", then
mark the DocumentLoader to be notified later when the final decision is available.
(WebCore::IconDatabase::iconDataKnownForIconURL): Determine if the actual image data has been read from disk (or set from the loader) for
icon URL in question
(WebCore::IconDatabase::setEnabled):
(WebCore::IconDatabase::isEnabled):
(WebCore::IconDatabase::setPrivateBrowsingEnabled):
(WebCore::IconDatabase::isPrivateBrowsingEnabled):
(WebCore::IconDatabase::delayDatabaseCleanup): Restore this method from a year ago, as asynchronous pruning of icons can now occur on a
background thread.
(WebCore::IconDatabase::allowDatabaseCleanup):
(WebCore::IconDatabase::checkIntegrityBeforeOpening):
(WebCore::IconDatabase::pageURLMappingCount):
(WebCore::IconDatabase::retainedPageURLCount):
(WebCore::IconDatabase::iconRecordCount):
(WebCore::IconDatabase::iconRecordCountWithData):
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::~IconDatabase):
(WebCore::IconDatabase::notifyPendingLoadDecisions): Tell all the registered DocumentLoaders "Hey, we've read in all URL mappings from disk,
so check to see if you are interested in any of them"
(WebCore::IconDatabase::notifyPendingLoadDecisionsInternal):
(WebCore::IconDatabase::wakeSyncThread): Wake the sync thread, if it is idle
(WebCore::IconDatabase::scheduleOrDeferSyncTimer): Even though we're on a background thread, we still defer writing out to disk during
periods of high activity
(WebCore::IconDatabase::syncTimerFired): Call wakeSyncThread()
Following block of methods may be used by either thread -
(WebCore::IconDatabase::isOpen):
(WebCore::IconDatabase::databasePath):
(WebCore::IconDatabase::defaultDatabaseFilename):
(WebCore::IconDatabase::getOrCreateIconRecord):
(WebCore::IconDatabase::getOrCreatePageURLRecord):
Following block of methods are used by the secondary thread only -
(WebCore::IconDatabase::importIconURLForPageURL): For the Safari 2 import procedure - write a URL mapping directly out to disk
(WebCore::IconDatabase::importIconDataForIconURL): For the Safari 2 import procedure - write an Icon directly out to disk
(WebCore::IconDatabase::shouldStopThreadActivity): To check and see if the thread should stop what it is doing now to do something
more important (such as quit, or delete all icons)
(WebCore::IconDatabase::iconDatabaseSyncThreadStart):
(WebCore::IconDatabase::iconDatabaseSyncThread): Entry point for the background thread
(WebCore::databaseVersionNumber):
(WebCore::isValidDatabase):
(WebCore::createDatabaseTables):
(WebCore::IconDatabase::performOpenInitialization): Open and validate the SQLite database, making sure it's schema jives with what
is expected
(WebCore::IconDatabase::checkIntegrity):
(WebCore::IconDatabase::performURLImport): Import all the Page URL -> Icon URL mappings from the database. Done "1st thing" on startup,
this is necessary to be able to give the loader decisions about whether or not it should load icons from the network
(WebCore::IconDatabase::syncThreadMainLoop): Main loop - sleeps until woken up, then does a read cycle and a write cycle until both cycles
do no work - then it goes back to sleep.
(WebCore::IconDatabase::readFromDatabase): Reads icons from the database that clients are waiting on
(WebCore::IconDatabase::writeToDatabase): Writes any changes page -> icon url mappings to disk, as well as any new image data that has
been received from the loader
(WebCore::IconDatabase::pruneUnretainedIcons): Done only once, and only after the first write to the database, this procedure removes all
icons and page URLs from disk that haven't been retained by any client. Note that the prune can be delayed by utilizing delayDatabaseCleanup()
(WebCore::IconDatabase::checkForDanglingPageURLs): Usually part of the prune procedure, prunes any pages who point to icons that no longer exist
in the database
(WebCore::IconDatabase::removeAllIconsOnThread): Completely purge both the on-disk and in memory records of all icons
(WebCore::IconDatabase::deleteAllPreparedStatements): Part of removeAllIcons and the thread cleanup procedure
(WebCore::IconDatabase::cleanupSyncThread): Write out any last remaining writes to disk, close the database, and then end the thread
(WebCore::IconDatabase::imported): Checks the DB to see if the Safari 2 import has occured
(WebCore::IconDatabase::setImported): Sets the "Safari 2 imported" flag
(WebCore::readySQLStatement):
(WebCore::IconDatabase::setIconURLForPageURLInSQLDatabase): This and the following "SQLDatabase" suffixed methods are pretty self explanatory
(WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
(WebCore::IconDatabase::removePageURLFromSQLDatabase):
(WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
(WebCore::IconDatabase::addIconURLToSQLDatabase):
(WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
(WebCore::IconDatabase::removeIconFromSQLDatabase):
(WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
- loader/icon/IconDatabase.h:
- loader/icon/IconDatabaseClient.h: Added. (WebCore::IconDatabaseClient::~IconDatabaseClient): (WebCore::IconDatabaseClient::performImport): Perform the Safari 2 import, implemented by WebKit (WebCore::IconDatabaseClient::dispatchDidRemoveAllIcons): Send the API notification (WebCore::IconDatabaseClient::dispatchDidAddIconForPageURL): Ditto
- loader/icon/IconDatabaseNone.cpp: Best attempt to keep non icon-DB platforms building (WebCore::IconDatabase::defaultDatabaseFilename): (WebCore::IconDatabase::readIconForPageURLFromDisk): (WebCore::IconDatabase::loadDecisionForIconURL): (WebCore::IconDatabase::iconDataKnownForIconURL): (WebCore::IconDatabase::setIconURLForPageURL): (WebCore::IconDatabase::isEnabled): (WebCore::IconDatabase::delayDatabaseCleanup): (WebCore::IconDatabase::allowDatabaseCleanup): (WebCore::IconDatabase::setClient):
- loader/icon/IconRecord.cpp: Added. (WebCore::IconRecord::IconRecord): IconRecord used to be "IconDataCache" - it is merely a container for the url, timestamp, and image for a site icon. It is Shared, and therefore ref counted - PageURLRecords are the owning containers. This is a tricky way to track how many page urls are retaining an IconRecord and therefore tracking when we should try to get rid of one. (WebCore::IconRecord::~IconRecord): (WebCore::IconRecord::image): (WebCore::IconRecord::setImageData): (WebCore::IconRecord::loadImageFromResource): (WebCore::IconRecord::imageDataStatus): Return whether the image data hasn't been read yet, exists in memory, or is absent (site with no icon) (WebCore::IconRecord::snapshot): Returns a snapshot of the icon's data - url, timestamp, and image data - to be written to disk
- loader/icon/IconRecord.h: Added. (WebCore::IconSnapshot::IconSnapshot): (WebCore::IconRecord::getTimestamp): (WebCore::IconRecord::setTimestamp): (WebCore::IconRecord::iconURL): (WebCore::IconRecord::retainingPageURLs):
- loader/icon/PageURLRecord.cpp: Added. (WebCore::PageURLRecord::PageURLRecord): PageURLRecord is fundamentally a pairing of a Page URL to an Icon. It has manual ref counting for the sake of "retainIconForPageURL" and "releaseIconForPageURL", and can provide a quick snapshot of it's Page URL -> Icon URL mapping for writing to the database (WebCore::PageURLRecord::setIconRecord): (WebCore::PageURLRecord::snapshot):
- loader/icon/PageURLRecord.h: Added. (WebCore::PageURLSnapshot::PageURLSnapshot): (WebCore::PageURLRecord::url): (WebCore::PageURLRecord::PageURLRecord::iconRecord): (WebCore::PageURLRecord::retain): (WebCore::PageURLRecord::release): (WebCore::PageURLRecord::retainCount):
- platform/SharedBuffer.cpp: (WebCore::SharedBuffer::copy): Added a deep copy method for the purposes of handing icon data across the thread boundary into the icon database
- platform/SharedBuffer.h:
- platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyFrameLoaderClient::registerForIconNotification):
- platform/win/TemporaryLinkStubs.cpp: (WebCore::callOnMainThread): Only other IconDatabase utilizing platform - keep their build going
WebKit:
Reviewed by Darin
<rdar://problem/5434431> - Asynchronous Icon Database
WebKit side of things
Mainly, there are Notifications WebKit has to listen for now that tell it when to either call back into WebCore
for some purpose or to send the webView:didReceiveIcon: delegate call
Many smaller tweaks as well.
- Misc/WebIconDatabase.h:
- Misc/WebIconDatabase.mm: (defaultClient): (-[WebIconDatabase init]): (+[WebIconDatabase delayDatabaseCleanup]): Accessor so clients can prevent the thread from cleaning up the database before they've done all their necessary retaining of icons. (+[WebIconDatabase allowDatabaseCleanup]): (-[WebIconDatabase removeAllIcons]): (-[WebIconDatabase _isEnabled]): (-[WebIconDatabase _sendNotificationForURL:]): (-[WebIconDatabase _sendDidRemoveAllIconsNotification]): (-[WebIconDatabase _databaseDirectory]):
(-[ThreadEnabler threadEnablingSelector:]): Quick and dirty class to enabled Cocoa multithreading
(+[ThreadEnabler enableThreading]):
(importToWebCoreFormat):
- Misc/WebIconDatabaseInternal.h: Expose the internal methods of WebIconDatabase that are required by WebIconDatabaseClient
- Misc/WebNSNotificationCenterExtras.h: Added. - Great utility class whose design was borrowed from Colloquy that allows the posting of a Cocoa notification on the main thread from *any* thread
- Misc/WebNSNotificationCenterExtras.m: Added. (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:]): (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:]): (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]): (+[NSNotificationCenter _postNotificationName:]):
- WebCoreSupport/WebFrameLoaderClient.h:
- WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::dispatchDidReceiveIcon): Send the webView:didReceiveIcon: delegate call (WebFrameLoaderClient::registerForIconNotification):
- WebCoreSupport/WebIconDatabaseClient.h: Added.
- WebCoreSupport/WebIconDatabaseClient.mm: Added. (WebIconDatabaseClient::performImport): Perform the Safari 2 icon import (WebIconDatabaseClient::dispatchDidRemoveAllIcons): Send the NSNotification (WebIconDatabaseClient::dispatchDidAddIconForPageURL): Ditto
- WebView/WebView.mm: (-[WebView _receivedIconChangedNotification:]): Check and see if this notification is for this WebView's current URL by calling back into the IconDatabase (-[WebView _registerForIconNotification:]): Support for WebIconDatabaseClient (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Dispatch this delegate call as well as unregister for the notification
- WebView/WebViewInternal.h:
- WebKit.xcodeproj/project.pbxproj:
win:
<rdar://problem/5434431> - Asynchronous Icon Database
- WebFrame.cpp: (WebFrame::didPerformFirstNavigation): Empty impl for now (WebFrame::registerForIconNotification): Ditto
- WebFrame.h: