WebKit should provide usage and eligibility information about the page cache. This will help a client provide a debug window into the page cache to spot common disqualifiers.
Created attachment 32791 [details] Patch
Comment on attachment 32791 [details] Patch > + (WebCore::CachedFrame::childFrameCount): Since this is recursive, I think a better name would be descendantFrameCount. A function that returns 1 + number of descendants (i.e. total number of frames in the subtree) may be simpler (and easier to use in PageCache::frameCount!). > + (+[WebCoreStatistics numberCachedPages]): > + (+[WebCoreStatistics numberCachedFrames]): > + (+[WebCoreStatistics numberAutoreleasedPages]): I think either “numberOf*” or “*Count” would be better names. > + * WebView/WebFrame.mm: > + (-[WebFrame _cacheabilityDictionary]): Returns a dictionary with all the data about > + why the frame is not cacheable. What if the frame is cacheable? > + FrameLoader* fl = _private->coreFrame->loader(); > + DocumentLoader* dl = fl->documentLoader(); Please use “frameLoader” and “documentLoader” as variable names.
Comment on attachment 32791 [details] Patch r=me if you address the above comments
Sending WebCore/ChangeLog Sending WebCore/WebCore.base.exp Sending WebCore/history/CachedFrame.cpp Sending WebCore/history/CachedFrame.h Sending WebCore/history/PageCache.cpp Sending WebCore/history/PageCache.h Sending WebKit/mac/ChangeLog Sending WebKit/mac/Misc/WebCoreStatistics.h Sending WebKit/mac/Misc/WebCoreStatistics.mm Sending WebKit/mac/WebKit.exp Sending WebKit/mac/WebView/WebFrame.mm Sending WebKit/mac/WebView/WebFramePrivate.h Transmitting file data ............ Committed revision 45923.