Changeset 69783 in webkit


Ignore:
Timestamp:
Oct 14, 2010 11:36:47 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-14 Ryuan Choi <ryuan.choi@samsung.com>

Reviewed by Eric Seidel.

[EFL] Add setting api for enabling encoding detector
https://bugs.webkit.org/show_bug.cgi?id=45427

Add settings api for enabling encoding detector.

  • ewk/ewk_view.cpp: (_ewk_view_priv_new): (ewk_view_setting_encoding_detector_set): (ewk_view_setting_encoding_detector_get):
  • ewk/ewk_view.h:
Location:
trunk/WebKit/efl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/efl/ChangeLog

    r69704 r69783  
     12010-10-14  Ryuan Choi  <ryuan.choi@samsung.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [EFL] Add setting api for enabling encoding detector
     6        https://bugs.webkit.org/show_bug.cgi?id=45427
     7
     8        Add settings api for enabling encoding detector.
     9
     10        * ewk/ewk_view.cpp:
     11        (_ewk_view_priv_new):
     12        (ewk_view_setting_encoding_detector_set):
     13        (ewk_view_setting_encoding_detector_get):
     14        * ewk/ewk_view.h:
     15
    1162010-10-13  Leandro Pereira  <leandro@profusion.mobi>
    217
  • trunk/WebKit/efl/ewk/ewk_view.cpp

    r69650 r69783  
    116116        Eina_Bool enable_plugins:1;
    117117        Eina_Bool enable_frame_flattening:1;
     118        Eina_Bool encoding_detector:1;
    118119        Eina_Bool scripts_window_open:1;
    119120        Eina_Bool resizable_textareas:1;
     
    571572    priv->page_settings->setOfflineWebApplicationCacheEnabled(true);
    572573    priv->page_settings->setUsesPageCache(true);
     574    priv->page_settings->setUsesEncodingDetector(true);
    573575
    574576    url = priv->page_settings->userStyleSheetLocation();
     
    615617    priv->settings.offline_app_cache = true; // XXX no function to read setting; this keeps the original setting
    616618    priv->settings.page_cache = priv->page_settings->usesPageCache();
     619    priv->settings.encoding_detector = priv->page_settings->usesEncodingDetector();
    617620
    618621    // Since there's no scale separated from zooming in webkit-efl, this functionality of
     
    25272530}
    25282531
     2532/**
     2533 * Sets the encoding detector.
     2534 *
     2535 * @param o view object to set if encoding detector is enabled.
     2536 * @return @c EINA_TRUE on success and @c EINA_FALSE on failure
     2537 */
     2538Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable)
     2539{
     2540    EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2541    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
     2542    enable = !!enable;
     2543    if (priv->settings.encoding_detector != enable) {
     2544        priv->page_settings->setUsesEncodingDetector(enable);
     2545        priv->settings.encoding_detector = enable;
     2546    }
     2547    return EINA_TRUE;
     2548}
     2549
     2550/**
     2551 * Gets if the encoding detector is enabled.
     2552 *
     2553 * @param o view object to get if encoding detector is enabled.
     2554 * @return @c EINA_TRUE if encoding detector is enabled, @c EINA_FALSE if not or on errors.
     2555 */
     2556Eina_Bool ewk_view_setting_encoding_detector_get(Evas_Object* o)
     2557{
     2558    EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2559    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
     2560    return priv->settings.encoding_detector;
     2561}
     2562
    25292563const char* ewk_view_setting_cache_directory_get(const Evas_Object* o)
    25302564{
     
    27452779 * Gets if the local storage is enabled.
    27462780 *
    2747  * @param o view object to set if local storage is enabled.
    2748  * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not.
     2781 * @param o view object to get if local storage is enabled.
     2782 * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not or on errors.
    27492783 */
    27502784Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o)
  • trunk/WebKit/efl/ewk/ewk_view.h

    r69650 r69783  
    456456EAPI Eina_Bool    ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable);
    457457
     458EAPI Eina_Bool    ewk_view_setting_encoding_detector_get(Evas_Object* o);
     459EAPI Eina_Bool    ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable);
     460
    458461/* to be used by subclass implementations */
    459462EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o);
Note: See TracChangeset for help on using the changeset viewer.