2011-05-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>

        Reviewed by Kenneth Rohde Christiansen.

        [EFL] Move ewk_view_dpi_get() to ewk_util.cpp
        https://bugs.webkit.org/show_bug.cgi?id=60753

        Move ewk_view_dpi_get() to ewk_util.cpp

        * ewk/ewk_private.h:
        * ewk/ewk_util.cpp:
        (ewk_util_dpi_get):
        * ewk/ewk_view.cpp:
        (_ewk_view_viewport_attributes_compute):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 20657cef
2011-05-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Reviewed by Kenneth Rohde Christiansen.
[EFL] Move ewk_view_dpi_get() to ewk_util.cpp
https://bugs.webkit.org/show_bug.cgi?id=60753
Move ewk_view_dpi_get() to ewk_util.cpp
* ewk/ewk_private.h:
* ewk/ewk_util.cpp:
(ewk_util_dpi_get):
* ewk/ewk_view.cpp:
(_ewk_view_viewport_attributes_compute):
2011-05-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Reviewed by Antonio Gomes.
......
......@@ -111,7 +111,7 @@ void ewk_view_viewport_attributes_set(Evas_Object *o, const WebCore::ViewportArg
void ewk_view_download_request(Evas_Object *o, Ewk_Download *download);
int ewk_view_dpi_get(void);
int ewk_util_dpi_get(void);
#if ENABLE(TOUCH_EVENTS)
void ewk_view_need_touch_events_set(Evas_Object*, bool needed);
......
......@@ -24,6 +24,10 @@
#include "ewk_private.h"
#include <eina_safety_checks.h>
#ifdef HAVE_ECORE_X
#include <Ecore_X.h>
#endif
/**
* Converts an image from cairo_surface to the Evas_Object.
*
......@@ -103,3 +107,19 @@ Evas_Object* ewk_util_image_from_cairo_surface_add(Evas* canvas, cairo_surface_t
return image;
}
/**
* @internal
* Gets dpi value.
*
* @return device's dpi value.
*/
int ewk_util_dpi_get(void)
{
#ifdef HAVE_ECORE_X
return ecore_x_dpi_get();
#else
return 160;
#endif
}
......@@ -52,10 +52,6 @@
#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)
......@@ -1014,7 +1010,7 @@ static WebCore::ViewportAttributes _ewk_view_viewport_attributes_compute(Evas_Ob
EWK_VIEW_PRIV_GET(sd, priv);
int desktop_width = 980;
int device_dpi = ewk_view_dpi_get();
int device_dpi = ewk_util_dpi_get();
int available_width = (int) priv->page->chrome()->client()->pageRect().width();
int available_height = (int) priv->page->chrome()->client()->pageRect().height();
......@@ -4445,21 +4441,6 @@ WebCore::FloatRect ewk_view_page_rect_get(Evas_Object *o)
return main_frame->view()->frameRect();
}
/**
* @internal
* Gets dpi value.
*
* @return device's dpi value.
*/
int ewk_view_dpi_get(void)
{
#ifdef HAVE_ECORE_X
return ecore_x_dpi_get();
#else
return 160;
#endif
}
#if ENABLE(TOUCH_EVENTS)
void ewk_view_need_touch_events_set(Evas_Object* o, bool needed)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment