diff options
Diffstat (limited to 'WebKit/efl/ewk')
-rw-r--r-- | WebKit/efl/ewk/ewk_main.cpp | 1 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_private.h | 8 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_settings.cpp | 42 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_settings.h | 2 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_view.cpp | 230 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_view.h | 8 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_view_single.c | 2 |
7 files changed, 231 insertions, 62 deletions
diff --git a/WebKit/efl/ewk/ewk_main.cpp b/WebKit/efl/ewk/ewk_main.cpp index 8c27478..26dec81 100644 --- a/WebKit/efl/ewk/ewk_main.cpp +++ b/WebKit/efl/ewk/ewk_main.cpp @@ -175,6 +175,7 @@ Eina_Bool _ewk_init_body(void) WTF::String wkdir = WTF::String(home) + "/.webkit"; ewk_settings_web_database_path_set(wkdir.utf8().data()); + ewk_settings_icon_database_path_set(wkdir.utf8().data()); WebCore::cacheStorage().setCacheDirectory(wkdir); diff --git a/WebKit/efl/ewk/ewk_private.h b/WebKit/efl/ewk/ewk_private.h index eaad13c..e2624a3 100644 --- a/WebKit/efl/ewk/ewk_private.h +++ b/WebKit/efl/ewk/ewk_private.h @@ -102,10 +102,12 @@ WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object *o, Evas_Objec WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* o, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually); void ewk_view_popup_new(Evas_Object *o, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect); -void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable); +void ewk_view_viewport_attributes_set(Evas_Object *o, const WebCore::ViewportArguments& arguments); void ewk_view_download_request(Evas_Object *o, Ewk_Download *download); +int ewk_view_dpi_get(); + Ewk_History *ewk_history_new(WebCore::BackForwardList *history); void ewk_history_free(Ewk_History *history); @@ -150,6 +152,10 @@ WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* o, const W Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* o, Ewk_Frame_Resource_Request* request); +void ewk_view_contents_size_changed(Evas_Object *o, Evas_Coord w, Evas_Coord h); + +WebCore::FloatRect ewk_view_page_rect_get(Evas_Object *o); + #ifdef __cplusplus } diff --git a/WebKit/efl/ewk/ewk_settings.cpp b/WebKit/efl/ewk/ewk_settings.cpp index 6d2be05..f2651a1 100644 --- a/WebKit/efl/ewk/ewk_settings.cpp +++ b/WebKit/efl/ewk/ewk_settings.cpp @@ -44,6 +44,8 @@ #include <libsoup/soup.h> #endif +static const char* _ewk_default_web_database_path = 0; +static const char* _ewk_icon_database_path = 0; static uint64_t _ewk_default_web_database_quota = 1 * 1024 * 1024; /** @@ -69,21 +71,27 @@ void ewk_settings_web_database_path_set(const char *path) #if ENABLE(DATABASE) WTF::String corePath = WTF::String::fromUTF8(path); WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(corePath); + if (!_ewk_default_web_database_path) + _ewk_default_web_database_path = eina_stringshare_add(corePath.utf8().data()); + else + eina_stringshare_replace(&_ewk_default_web_database_path, corePath.utf8().data()); + #endif } /** * Return directory path where web database is stored. * - * @return newly allocated string with database path. Note that return must be - * freed with free() as it's a strdup()ed copy of the string due reference - * counting. + * @return database path or NULL if none or web database is not supported. + * This is guaranteed to be eina_stringshare, so whenever possible + * save yourself some cpu cycles and use + * eina_stringshare_ref() instead of eina_stringshare_add() or + * strdup(). */ const char *ewk_settings_web_database_path_get() { #if ENABLE(DATABASE) - WTF::String path = WebCore::DatabaseTracker::tracker().databaseDirectoryPath(); - return strdup(path.utf8().data()); + return _ewk_default_web_database_path; #else return 0; #endif @@ -122,9 +130,17 @@ Eina_Bool ewk_settings_icon_database_path_set(const char *directory) WebCore::iconDatabase()->setEnabled(true); WebCore::iconDatabase()->open(WTF::String::fromUTF8(directory)); + if (!_ewk_icon_database_path) + _ewk_icon_database_path = eina_stringshare_add(directory); + else + eina_stringshare_replace(&_ewk_icon_database_path, directory); } else { WebCore::iconDatabase()->setEnabled(false); WebCore::iconDatabase()->close(); + if (_ewk_icon_database_path) { + eina_stringshare_del(_ewk_icon_database_path); + _ewk_icon_database_path = 0; + } } return EINA_TRUE; } @@ -132,22 +148,20 @@ Eina_Bool ewk_settings_icon_database_path_set(const char *directory) /** * Return directory path where icon database is stored. * - * @return newly allocated string with database path or @c NULL if - * none is set or database is closed. Note that return must be - * freed with free() as it's a strdup()ed copy of the string - * due reference counting. + * @return database path or @c NULL if none is set or database is closed. + * This is guaranteed to be eina_stringshare, so whenever possible + * save yourself some cpu cycles and use + * eina_stringshare_ref() instead of eina_stringshare_add() or + * strdup(). */ -char* ewk_settings_icon_database_path_get(void) +const char* ewk_settings_icon_database_path_get(void) { if (!WebCore::iconDatabase()->isEnabled()) return 0; if (!WebCore::iconDatabase()->isOpen()) return 0; - WTF::String path = WebCore::iconDatabase()->databasePath(); - if (path.isEmpty()) - return 0; - return strdup(path.utf8().data()); + return _ewk_icon_database_path; } /** diff --git a/WebKit/efl/ewk/ewk_settings.h b/WebKit/efl/ewk/ewk_settings.h index f2d77f7..3c1668f 100644 --- a/WebKit/efl/ewk/ewk_settings.h +++ b/WebKit/efl/ewk/ewk_settings.h @@ -42,7 +42,7 @@ EAPI void ewk_settings_web_database_path_set(const char *path); EAPI const char *ewk_settings_web_database_path_get(); EAPI Eina_Bool ewk_settings_icon_database_path_set(const char *path); -EAPI char *ewk_settings_icon_database_path_get(void); +EAPI const char *ewk_settings_icon_database_path_get(void); EAPI Eina_Bool ewk_settings_icon_database_clear(void); EAPI cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *url); diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp index 19efbfa..f1ca733 100644 --- a/WebKit/efl/ewk/ewk_view.cpp +++ b/WebKit/efl/ewk/ewk_view.cpp @@ -22,7 +22,7 @@ #include "config.h" #include "ewk_view.h" -#include "appcache/ApplicationCacheStorage.h" +#include "Chrome.h" #include "ChromeClientEfl.h" #include "ContextMenuClientEfl.h" #include "ContextMenuController.h" @@ -42,6 +42,7 @@ #include "PlatformMouseEvent.h" #include "PopupMenuClient.h" #include "ProgressTracker.h" +#include "appcache/ApplicationCacheStorage.h" #include "ewk_private.h" #include <Ecore.h> @@ -51,9 +52,15 @@ #include <inttypes.h> #include <sys/time.h> +#ifdef HAVE_ECORE_X +#include <Ecore_X.h> +#endif + #define ZOOM_MIN (0.05) #define ZOOM_MAX (4.0) +#define DEVICE_PIXEL_RATIO (1.0) + static const char EWK_VIEW_TYPE_STR[] = "EWK_View"; static const size_t EWK_VIEW_REPAINTS_SIZE_INITIAL = 32; @@ -68,6 +75,7 @@ struct _Ewk_View_Private_Data { WebCore::Page* page; WebCore::Settings* page_settings; WebCore::Frame* main_frame; + WebCore::ViewportArguments viewport_arguments; Ewk_History* history; struct { Ewk_Menu menu; @@ -104,9 +112,11 @@ struct _Ewk_View_Private_Data { const char* font_sans_serif; Eina_Bool auto_load_images:1; Eina_Bool auto_shrink_images:1; + Eina_Bool enable_auto_resize_window:1; Eina_Bool enable_scripts:1; Eina_Bool enable_plugins:1; Eina_Bool enable_frame_flattening:1; + Eina_Bool encoding_detector:1; Eina_Bool scripts_window_open:1; Eina_Bool resizable_textareas:1; Eina_Bool private_browsing:1; @@ -116,18 +126,11 @@ struct _Ewk_View_Private_Data { Eina_Bool offline_app_cache: 1; Eina_Bool page_cache: 1; struct { - float w; - float h; - float init_scale; - float min_scale; - float max_scale; - float user_scalable; - } viewport; - struct { float min_scale; float max_scale; Eina_Bool user_scalable:1; } zoom_range; + float device_pixel_ratio; } settings; struct { struct { @@ -569,6 +572,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->page_settings->setLocalStorageEnabled(true); priv->page_settings->setOfflineWebApplicationCacheEnabled(true); priv->page_settings->setUsesPageCache(true); + priv->page_settings->setUsesEncodingDetector(true); url = priv->page_settings->userStyleSheetLocation(); priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data()); @@ -603,6 +607,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.auto_load_images = priv->page_settings->loadsImagesAutomatically(); priv->settings.auto_shrink_images = priv->page_settings->shrinksStandaloneImagesToFit(); + priv->settings.enable_auto_resize_window = EINA_TRUE; priv->settings.enable_scripts = priv->page_settings->isJavaScriptEnabled(); priv->settings.enable_plugins = priv->page_settings->arePluginsEnabled(); priv->settings.enable_frame_flattening = priv->page_settings->frameFlatteningEnabled(); @@ -613,6 +618,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.local_storage = priv->page_settings->localStorageEnabled(); priv->settings.offline_app_cache = true; // XXX no function to read setting; this keeps the original setting priv->settings.page_cache = priv->page_settings->usesPageCache(); + priv->settings.encoding_detector = priv->page_settings->usesEncodingDetector(); // Since there's no scale separated from zooming in webkit-efl, this functionality of // viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl, @@ -620,6 +626,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.zoom_range.min_scale = ZOOM_MIN; priv->settings.zoom_range.max_scale = ZOOM_MAX; priv->settings.zoom_range.user_scalable = EINA_TRUE; + priv->settings.device_pixel_ratio = DEVICE_PIXEL_RATIO; priv->main_frame = _ewk_view_core_frame_new(sd, priv, 0).get(); if (!priv->main_frame) { @@ -805,10 +812,6 @@ static void _ewk_view_smart_calculate(Evas_Object* o) view->resize(w, h); view->forceLayout(); view->adjustViewSize(); - IntSize size = view->contentsSize(); - if (!sd->api->contents_resize(sd, size.width(), size.height())) - ERR("failed to resize contents to %dx%d", - size.width(), size.height()); } evas_object_resize(sd->main_frame, w, h); sd->changed.frame_rect = EINA_TRUE; @@ -967,6 +970,26 @@ static void _ewk_view_zoom_animation_start(Ewk_View_Smart_Data* sd) (_ewk_view_zoom_animator_cb, sd); } +static WebCore::ViewportAttributes _ewk_view_viewport_attributes_compute(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + int desktop_width = 980; + int device_dpi = 160; + + int available_width = (int) priv->page->chrome()->client()->pageRect().width(); + int available_height = (int) priv->page->chrome()->client()->pageRect().height(); + + int device_width = (int) priv->page->chrome()->client()->windowRect().width(); + int device_height = (int) priv->page->chrome()->client()->windowRect().height(); + + IntSize available_size = IntSize(available_width, available_height); + WebCore::ViewportAttributes attributes = WebCore::computeViewportAttributes(priv->viewport_arguments, desktop_width, device_width, device_height, device_dpi, available_size); + + return attributes; +} + /** * Sets the smart class api without any backing store, enabling view * to be inherited. @@ -1052,10 +1075,6 @@ void ewk_view_fixed_layout_size_set(Evas_Object* o, Evas_Coord w, Evas_Coord h) EWK_VIEW_SD_GET_OR_RETURN(o, sd); EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); - WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->main_frame->loader()->client()); - if (!client->getInitLayoutCompleted()) - return; - WebCore::FrameView* view = sd->_priv->main_frame->view(); if (w <= 0 && h <= 0) { if (!priv->fixed_layout.use) @@ -2282,6 +2301,39 @@ Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object* o, Eina_Bool auto return EINA_TRUE; } +/** + * Gets if view can be resized automatically. + * + * @param o view to check status + * + * @return EINA_TRUE if view can be resized, EINA_FALSE + * otherwise (errors, cannot be resized). + */ +Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.enable_auto_resize_window; +} + +/** + * Sets if view can be resized automatically. + * + * @param o View. + * @param resizable @c EINA_TRUE if we want to resize automatically; + * @c EINA_FALSE otherwise. It defaults to @c EINA_TRUE + * + * @return EINA_TRUE if auto_resize_window status set, EINA_FALSE + * otherwise (errors). + */ +Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object* o, Eina_Bool resizable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + priv->settings.enable_auto_resize_window = resizable; + return EINA_TRUE; +} + Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object* o) { EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); @@ -2512,6 +2564,37 @@ Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* enco return EINA_TRUE; } +/** + * Sets the encoding detector. + * + * @param o view object to set if encoding detector is enabled. + * @return @c EINA_TRUE on success and @c EINA_FALSE on failure + */ +Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + enable = !!enable; + if (priv->settings.encoding_detector != enable) { + priv->page_settings->setUsesEncodingDetector(enable); + priv->settings.encoding_detector = enable; + } + return EINA_TRUE; +} + +/** + * Gets if the encoding detector is enabled. + * + * @param o view object to get if encoding detector is enabled. + * @return @c EINA_TRUE if encoding detector is enabled, @c EINA_FALSE if not or on errors. + */ +Eina_Bool ewk_view_setting_encoding_detector_get(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.encoding_detector; +} + const char* ewk_view_setting_cache_directory_get(const Evas_Object* o) { EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); @@ -2730,8 +2813,8 @@ Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enab /** * Gets if the local storage is enabled. * - * @param o view object to set if local storage is enabled. - * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not. + * @param o view object to get if local storage is enabled. + * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not or on errors. */ Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o) { @@ -4053,33 +4136,21 @@ void ewk_view_download_request(Evas_Object* o, Ewk_Download* download) * @internal * Reports the viewport has changed. * - * @param o view. - * @param w width. - * @param h height. - * @param init_scale initialScale value. - * @param max_scale maximumScale value. - * @param min_scale minimumScale value. - * @param user_scalable userscalable flag. + * @param arguments viewport argument. * * Emits signal: "viewport,changed" with no parameters. */ -void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable) +void ewk_view_viewport_attributes_set(Evas_Object *o, const WebCore::ViewportArguments& arguments) { EWK_VIEW_SD_GET(o, sd); EWK_VIEW_PRIV_GET(sd, priv); - - priv->settings.viewport.w = w; - priv->settings.viewport.h = h; - priv->settings.viewport.init_scale = init_scale; - priv->settings.viewport.min_scale = min_scale; - priv->settings.viewport.max_scale = max_scale; - priv->settings.viewport.user_scalable = user_scalable; - + + priv->viewport_arguments = arguments; evas_object_smart_callback_call(o, "viewport,changed", 0); } /** - * Gets data of viewport meta tag. + * Gets attributes of viewport meta tag. * * @param o view. * @param w width. @@ -4087,25 +4158,27 @@ void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, f * @param init_scale initial Scale value. * @param max_scale maximum Scale value. * @param min_scale minimum Scale value. + * @param device_pixel_ratio value. * @param user_scalable user Scalable value. */ -void ewk_view_viewport_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* user_scalable) +void ewk_view_viewport_attributes_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* device_pixel_ratio, Eina_Bool* user_scalable) { - EWK_VIEW_SD_GET(o, sd); - EWK_VIEW_PRIV_GET(sd, priv); + WebCore::ViewportAttributes attributes = _ewk_view_viewport_attributes_compute(o); if (w) - *w = priv->settings.viewport.w; + *w = attributes.layoutSize.width(); if (h) - *h = priv->settings.viewport.h; + *h = attributes.layoutSize.height(); if (init_scale) - *init_scale = priv->settings.viewport.init_scale; + *init_scale = attributes.initialScale; if (max_scale) - *max_scale = priv->settings.viewport.max_scale; + *max_scale = attributes.maximumScale; if (min_scale) - *min_scale = priv->settings.viewport.min_scale; + *min_scale = attributes.minimumScale; + if (device_pixel_ratio) + *device_pixel_ratio = attributes.devicePixelRatio; if (user_scalable) - *user_scalable = priv->settings.viewport.user_scalable; + *user_scalable = attributes.userScalable; } /** @@ -4195,6 +4268,22 @@ Eina_Bool ewk_view_user_scalable_get(Evas_Object* o) } /** + * Gets device pixel ratio value. + * + * @param o view. + * @param user_scalable where to return the current user scalable value. + * + * @return @c EINA_TRUE if zoom is enabled, @c EINA_FALSE if not. + */ +float ewk_view_device_pixel_ratio_get(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + return priv->settings.device_pixel_ratio; +} + +/** * @internal * Reports a requeset will be loaded. It's client responsibility to decide if * request would be used. If @return is true, loader will try to load. Else, @@ -4213,3 +4302,54 @@ Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* o, Ewk_Frame_Resource return sd->api->navigation_policy_decision(sd, request); } + +/** + * @internal + * Reports that the contents have resized. The ewk_view calls contents_resize, + * which can be reimplemented as needed. + * + * @param o view. + * @param w new content width. + * @param h new content height. + */ +void ewk_view_contents_size_changed(Evas_Object *o, int w, int h) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->contents_resize); + + if (!sd->api->contents_resize(sd, w, h)) + ERR("failed to resize contents to %dx%d", w, h); +} + +/** + * @internal + * Gets page size from frameview. + * + * @param o view. + * + * @return page size. + */ +WebCore::FloatRect ewk_view_page_rect_get(Evas_Object *o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + WebCore::Frame* main_frame = priv->page->mainFrame(); + return main_frame->view()->frameRect(); +} + +/** + * @internal + * Gets dpi value. + * + * @return device's dpi value. + */ +int ewk_view_dpi_get() +{ +#ifdef HAVE_ECORE_X + return ecore_x_dpi_get(); +#else + return 160; +#endif +} diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h index 26bf97c..1c4de34 100644 --- a/WebKit/efl/ewk/ewk_view.h +++ b/WebKit/efl/ewk/ewk_view.h @@ -384,6 +384,8 @@ EAPI Eina_Bool ewk_view_setting_auto_load_images_set(Evas_Object *o, Eina_Boo EAPI Eina_Bool ewk_view_setting_auto_shrink_images_get(const Evas_Object *o); EAPI Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object *o, Eina_Bool automatic); +EAPI Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object *o, Eina_Bool resizable); EAPI Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object *o); EAPI Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object *o, Eina_Bool enable); @@ -455,6 +457,9 @@ EAPI Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object * 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); +EAPI Eina_Bool ewk_view_setting_encoding_detector_get(Evas_Object* o); +EAPI Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable); + /* to be used by subclass implementations */ EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o); @@ -489,12 +494,13 @@ EAPI void ewk_view_paint_context_translate(Ewk_View_Paint_Context *ctxt, float x EAPI Eina_Bool ewk_view_paint(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area); EAPI Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area); -EAPI void ewk_view_viewport_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* user_scalable); +EAPI void ewk_view_viewport_attributes_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* device_pixel_ratio , Eina_Bool* user_scalable); EAPI Eina_Bool ewk_view_zoom_range_set(Evas_Object* o, float min_scale, float max_scale); EAPI float ewk_view_zoom_range_min_get(Evas_Object* o); EAPI float ewk_view_zoom_range_max_get(Evas_Object* o); EAPI void ewk_view_user_scalable_set(Evas_Object* o, Eina_Bool user_scalable); EAPI Eina_Bool ewk_view_user_scalable_get(Evas_Object* o); +EAPI float ewk_view_device_pixel_ratio_get(Evas_Object* o); #ifdef __cplusplus } diff --git a/WebKit/efl/ewk/ewk_view_single.c b/WebKit/efl/ewk/ewk_view_single.c index 803b219..85e5339 100644 --- a/WebKit/efl/ewk/ewk_view_single.c +++ b/WebKit/efl/ewk/ewk_view_single.c @@ -348,6 +348,8 @@ static Eina_Bool _ewk_view_single_smart_scrolls_process(Ewk_View_Smart_Data *sd) for (; sr < sr_end; sr++) _ewk_view_single_scroll_process_single(sd, pixels, ow, oh, sr); + evas_object_image_data_set(sd->backing_store, pixels); + return EINA_TRUE; } |