diff options
author | Kristian Monsen <kristianm@google.com> | 2010-09-30 15:42:16 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-10-07 10:59:29 +0100 |
commit | bec39347bb3bb5bf1187ccaf471d26247f28b585 (patch) | |
tree | 56bdc4c2978fbfd3d79d0d36d5d6c640ecc09cc8 /WebKit/efl/ewk | |
parent | 90b7966e7815b262cd19ac25f03aaad9b21fdc06 (diff) | |
download | external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.zip external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.gz external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.bz2 |
Merge WebKit at r68651 : Initial merge by git.
Change-Id: I3d6bff59f17eedd6722723354f386fec9be8ad12
Diffstat (limited to 'WebKit/efl/ewk')
-rw-r--r-- | WebKit/efl/ewk/ewk_frame.cpp | 2 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_frame.h | 2 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_view.cpp | 37 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_view.h | 4 |
4 files changed, 41 insertions, 4 deletions
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp index 038e105..1395fa5 100644 --- a/WebKit/efl/ewk/ewk_frame.cpp +++ b/WebKit/efl/ewk/ewk_frame.cpp @@ -847,7 +847,7 @@ static bool _ewk_frame_rect_is_negative_value(const WebCore::IntRect& i) * @return @c EINA_TRUE on success, @c EINA_FALSE for failure - when no matches found or * n bigger than search results. */ -Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object* o, int n, int* x, int* y) +Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object* o, size_t n, int* x, int* y) { EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); diff --git a/WebKit/efl/ewk/ewk_frame.h b/WebKit/efl/ewk/ewk_frame.h index 9394446..156bd82 100644 --- a/WebKit/efl/ewk/ewk_frame.h +++ b/WebKit/efl/ewk/ewk_frame.h @@ -160,7 +160,7 @@ EAPI unsigned int ewk_frame_text_matches_mark(Evas_Object *o, const char *string EAPI Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object *o); EAPI Eina_Bool ewk_frame_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight); EAPI Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object *o); -EAPI Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object *o, int n, int *x, int *y); +EAPI Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object *o, size_t n, int *x, int *y); EAPI Eina_Bool ewk_frame_stop(Evas_Object *o); EAPI Eina_Bool ewk_frame_reload(Evas_Object *o); diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp index 76e4bf5..19efbfa 100644 --- a/WebKit/efl/ewk/ewk_view.cpp +++ b/WebKit/efl/ewk/ewk_view.cpp @@ -91,6 +91,7 @@ struct _Ewk_View_Private_Data { const char* encoding_custom; const char* cache_directory; const char* theme; + const char* local_storage_database_path; int font_minimum_size; int font_minimum_logical_size; int font_default_size; @@ -579,6 +580,9 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.cache_directory = eina_stringshare_add (WebCore::cacheStorage().cacheDirectory().utf8().data()); + s = priv->page_settings->localStorageDatabasePath(); + priv->settings.local_storage_database_path = eina_stringshare_add(s.string().utf8().data()); + priv->settings.font_minimum_size = priv->page_settings->minimumFontSize(); priv->settings.font_minimum_logical_size = priv->page_settings->minimumLogicalFontSize(); priv->settings.font_default_size = priv->page_settings->defaultFontSize(); @@ -662,6 +666,7 @@ static void _ewk_view_priv_del(Ewk_View_Private_Data* priv) eina_stringshare_del(priv->settings.font_fantasy); eina_stringshare_del(priv->settings.font_serif); eina_stringshare_del(priv->settings.font_sans_serif); + eina_stringshare_del(priv->settings.local_storage_database_path); if (priv->animated_zoom.animator) ecore_animator_del(priv->animated_zoom.animator); @@ -2784,6 +2789,36 @@ Eina_Bool ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable) return EINA_TRUE; } +/* + * Gets the local storage database path. + * + * @param o view object to get the local storage database path. + * @return the local storage database path. + */ +const char* ewk_view_setting_local_storage_database_path_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.local_storage_database_path; +} + +/** + * Sets the local storage database path. + * + * @param o view object to set the local storage database path. + * @return @c EINA_TRUE on success and @c EINA_FALSE on failure + */ +Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object* o, const char* path) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.local_storage_database_path, path)) { + WTF::AtomicString s = WTF::String::fromUTF8(path); + priv->page_settings->setLocalStorageDatabasePath(s); + } + return EINA_TRUE; +} + /** * Similar to evas_object_smart_data_get(), but does type checking. * @@ -3769,7 +3804,7 @@ uint64_t ewk_view_exceeded_database_quota(Evas_Object* o, Evas_Object* frame, co if (!sd->api->exceeded_database_quota) return 0; - INF("current_size=%"PRIu64" expected_size="PRIu64, current_size, expected_size); + INF("current_size=%"PRIu64" expected_size=%"PRIu64, current_size, expected_size); return sd->api->exceeded_database_quota(sd, frame, databaseName, current_size, expected_size); } diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h index be27f68..26bf97c 100644 --- a/WebKit/efl/ewk/ewk_view.h +++ b/WebKit/efl/ewk/ewk_view.h @@ -151,7 +151,7 @@ struct _Ewk_View_Smart_Class { * @see EWK_VIEW_SMART_CLASS_INIT_VERSION * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION */ -#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} /** * Initializer to zero a whole Ewk_View_Smart_Class structure. @@ -449,6 +449,8 @@ EAPI Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_B EAPI Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o); EAPI Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable); +EAPI const char *ewk_view_setting_local_storage_database_path_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object *o, const char *path); EAPI Eina_Bool ewk_view_setting_page_cache_get(Evas_Object* o); EAPI Eina_Bool ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable); |