Changeset 73353 in webkit


Ignore:
Timestamp:
Dec 6, 2010 3:18:20 AM (13 years ago)
Author:
Martin Robinson
Message:

2010-12-06 Joone Hur <joone@kldp.org>

Reviewed by Xan Lopez.

[GTK] The webkit cache model needs to be set when WebFrameLoaderClient::didPerformFirstNavigation() is called
https://bugs.webkit.org/show_bug.cgi?id=50430

  • WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::didPerformFirstNavigation): Set the webview cache model.
  • webkit/webkitprivate.cpp: (webkit_init): Removed the code of setting the webview cache model.
Location:
trunk/WebKit/gtk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r73348 r73353  
     12010-12-06  Joone Hur  <joone@kldp.org>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] The webkit cache model needs to be set when WebFrameLoaderClient::didPerformFirstNavigation() is called
     6        https://bugs.webkit.org/show_bug.cgi?id=50430
     7
     8        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     9        (WebKit::FrameLoaderClient::didPerformFirstNavigation): Set the webview cache model.
     10        * webkit/webkitprivate.cpp:
     11        (webkit_init): Removed the code of setting the webview cache model.
     12
    1132010-12-04  Antonio Gomes  <agomes@rim.com>
    214
  • trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r72904 r73353  
    691691void FrameLoaderClient::didPerformFirstNavigation() const
    692692{
     693    WebKitCacheModel cacheModel = webkit_get_cache_model();
     694    // If user agents do not determine the cache model, we use WEBKIT_CACHE_MODEL_WEB_BROWSER by default.
     695    if (cacheModel == WEBKIT_CACHE_MODEL_DEFAULT)
     696        webkit_set_cache_model(WEBKIT_CACHE_MODEL_WEB_BROWSER);
    693697}
    694698
  • trunk/WebKit/gtk/webkit/webkitprivate.cpp

    r73348 r73353  
    284284    atomicCanonicalTextEncodingName("UTF-8");
    285285
    286     // Page cache capacity (in pages). Comment from Mac port:
    287     // (Research indicates that value / page drops substantially after 3 pages.)
    288     // FIXME: Expose this with an API and/or calculate based on available resources
    289     webkit_set_cache_model(WEBKIT_CACHE_MODEL_WEB_BROWSER);
    290 
    291286#if ENABLE(DATABASE)
    292287    gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL);
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r73348 r73353  
    126126
    127127static const double defaultDPI = 96.0;
    128 static WebKitCacheModel cacheModel;
     128static WebKitCacheModel cacheModel = WEBKIT_CACHE_MODEL_DEFAULT;
    129129static IntPoint globalPointForClientPoint(GdkWindow* window, const IntPoint& clientPoint);
    130130
     
    49954995        break;
    49964996    case WEBKIT_CACHE_MODEL_WEB_BROWSER:
     4997        // Page cache capacity (in pages). Comment from Mac port:
     4998        // (Research indicates that value / page drops substantially after 3 pages.)
    49974999        pageCacheCapacity = 3;
    49985000        cacheTotalCapacity = 32 * 1024 * 1024;
  • trunk/WebKit/gtk/webkit/webkitwebview.h

    r72675 r73353  
    5151} WebKitNavigationResponse;
    5252
     53/* 
     54 * WebKitCacheModel:
     55 * @WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER: Disable the cache completely, which
     56 *   substantially reduces memory usage. Useful for applications that only
     57 *   access local files.
     58 * @WEBKIT_CACHE_MODEL_WEB_BROWSER: Improve document load speed substantially
     59 *   by caching previously viewed content. This is the default setting.
     60 *
     61 * Enum values used for determining the webview cache model.
     62 */
    5363typedef enum {
    54     WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER = 1,
     64    /*< private >*/
     65    WEBKIT_CACHE_MODEL_DEFAULT,
     66    /*< public >*/
     67    WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER,
    5568    WEBKIT_CACHE_MODEL_WEB_BROWSER
    5669} WebKitCacheModel;
Note: See TracChangeset for help on using the changeset viewer.