⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 117785 in webkit


Ignore:
Timestamp:
May 21, 2012, 8:54:58 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Clients should be able to set page cache capacity.
https://bugs.webkit.org/show_bug.cgi?id=86960

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-05-21
Reviewed by Csaba Osztrogonác.

Exported memory page cache capacity getter and setter functions.
Those will be used both by clients and DRT Layout Test Controller.

  • ewk/ewk_settings.cpp:

(ewk_settings_page_cache_capacity_get):
(ewk_settings_page_cache_capacity_set):

  • ewk/ewk_settings.h:
Location:
trunk/Source/WebKit/efl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r117771 r117785  
     12012-05-21  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [EFL] Clients should be able to set page cache capacity.
     4        https://bugs.webkit.org/show_bug.cgi?id=86960
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        Exported memory page cache capacity getter and setter functions.
     9        Those will be used both by clients and DRT Layout Test Controller.
     10
     11        * ewk/ewk_settings.cpp:
     12        (ewk_settings_page_cache_capacity_get):
     13        (ewk_settings_page_cache_capacity_set):
     14        * ewk/ewk_settings.h:
     15
    1162012-05-21  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
    217
  • trunk/Source/WebKit/efl/ewk/ewk_main.cpp

    r117552 r117785  
    151151    // Page cache capacity (in pages). Comment from Mac port:
    152152    // (Research indicates that value / page drops substantially after 3 pages.)
    153     // FIXME: Expose this with an API and/or calculate based on available resources
    154     WebCore::pageCache()->setCapacity(3);
     153    // FIXME: Calculate based on available resources
     154    ewk_settings_page_cache_capacity_set(3);
    155155    WebCore::PageGroup::setShouldTrackVisitedLinks(true);
    156156
  • trunk/Source/WebKit/efl/ewk/ewk_settings.cpp

    r117464 r117785  
    249249}
    250250
     251unsigned ewk_settings_page_cache_capacity_get()
     252{
     253    return WebCore::pageCache()->capacity();
     254}
     255
     256void ewk_settings_page_cache_capacity_set(unsigned pages)
     257{
     258    WebCore::pageCache()->setCapacity(pages);
     259}
     260
    251261void ewk_settings_memory_cache_clear()
    252262{
  • trunk/Source/WebKit/efl/ewk/ewk_settings.h

    r117552 r117785  
    295295 */
    296296EAPI void             ewk_settings_object_cache_capacity_set(unsigned min_dead_bytes, unsigned max_dead_bytes, unsigned total_bytes);
     297
     298/**
     299 * Returns the maximum number of pages in the memory page cache.
     300 *
     301 * By default, maximum number of pages is 3.
     302 *
     303 * @return  The maximum number of pages in the memory page cache.
     304 *
     305 * @sa ewk_settings_page_cache_capacity_set
     306 */
     307EAPI unsigned         ewk_settings_page_cache_capacity_get(void);
     308
     309/**
     310 * Defines the capacity for the memory page cache.
     311 *
     312 * The page cache is responsible for holding visited web pages in memory. So it improves user experience when navigating forth or back
     313 * to pages in the forward/back history as the cached pages do not require to be loaded from server.
     314 *
     315 * By default, @p pages is 3.
     316 *
     317 * @param pages The maximum number of pages to keep in the memory page cache.
     318 */
     319EAPI void             ewk_settings_page_cache_capacity_set(unsigned pages);
    297320
    298321/**
Note: See TracChangeset for help on using the changeset viewer.