Changeset 100472 in webkit
- Timestamp:
- Nov 16, 2011, 11:03:49 AM (14 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r100463 r100472 1 2011-11-16 Raphael Kubo da Costa <kubo@profusion.mobi> 2 3 [EFL] Add ewk_settings_memory_cache_clear(). 4 https://bugs.webkit.org/show_bug.cgi?id=72141 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 This is the same as Qt's QWebSettings::clearMemoryCaches() and is 9 responsible for clearing, among others, the page, memory and font 10 caches. 11 12 * ewk/ewk_settings.cpp: 13 (ewk_settings_memory_cache_clear): 14 * ewk/ewk_settings.h: 15 1 16 2011-11-16 Raphael Kubo da Costa <kubo@profusion.mobi> 2 17 -
trunk/Source/WebKit/efl/ewk/ewk_settings.cpp
r100463 r100472 22 22 #include "ewk_settings.h" 23 23 24 #include "CrossOriginPreflightResultCache.h" 24 25 #include "DatabaseTracker.h" 25 26 #include "EWebKit.h" 27 #include "FontCache.h" 26 28 #include "FrameView.h" 27 29 #include "IconDatabase.h" … … 30 32 #include "KURL.h" 31 33 #include "MemoryCache.h" 34 #include "PageCache.h" 32 35 // FIXME: Why is there a directory in this include? 33 36 #include "appcache/ApplicationCacheStorage.h" … … 210 213 } 211 214 215 void ewk_settings_memory_cache_clear() 216 { 217 // Turn the cache on and off. Disabling the object cache will remove all 218 // resources from the cache. They may still live on if they are referenced 219 // by some Web page though. 220 if (!WebCore::memoryCache()->disabled()) { 221 WebCore::memoryCache()->setDisabled(true); 222 WebCore::memoryCache()->setDisabled(false); 223 } 224 225 int pageCapacity = WebCore::pageCache()->capacity(); 226 // Setting size to 0, makes all pages be released. 227 WebCore::pageCache()->setCapacity(0); 228 WebCore::pageCache()->releaseAutoreleasedPagesNow(); 229 WebCore::pageCache()->setCapacity(pageCapacity); 230 231 // Invalidating the font cache and freeing all inactive font data. 232 WebCore::fontCache()->invalidate(); 233 234 // Empty the Cross-Origin Preflight cache 235 WebCore::CrossOriginPreflightResultCache::shared().empty(); 236 } 237 212 238 void ewk_settings_repaint_throttling_set(double deferredRepaintDelay, double initialDeferredRepaintDelayDuringLoading, double maxDeferredRepaintDelayDuringLoading, double deferredRepaintDelayIncrementDuringLoading) 213 239 { -
trunk/Source/WebKit/efl/ewk/ewk_settings.h
r100463 r100472 185 185 */ 186 186 EAPI void ewk_settings_cache_capacity_set(unsigned capacity); 187 188 /** 189 * Clears all memory caches. 190 * 191 * This function clears all memory caches, which include the object cache (for resources such as 192 * images, scripts and stylesheets), the page cache, the font cache and the Cross-Origin Preflight 193 * cache. 194 */ 195 EAPI void ewk_settings_memory_cache_clear(void); 187 196 188 197 /**
Note:
See TracChangeset
for help on using the changeset viewer.