From b3fc412006184292e92f7b415d3e31f8e1d36bb4 Mon Sep 17 00:00:00 2001 From: Joone Hur Date: Wed, 3 Jul 2013 08:20:25 -0700 Subject: [PATCH] Make a web page fit in the window This patch allows to get the screen size and DPI properly using Wayland APIs, which makes a web page fit in the window. --- Source/WebCore/platform/efl/EflScreenUtilities.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/platform/efl/EflScreenUtilities.cpp b/Source/WebCore/platform/efl/EflScreenUtilities.cpp index 812f1ac..0ece8c2 100644 --- a/Source/WebCore/platform/efl/EflScreenUtilities.cpp +++ b/Source/WebCore/platform/efl/EflScreenUtilities.cpp @@ -24,6 +24,9 @@ #include #include #include +#else +#include +#include #endif namespace WebCore { @@ -123,7 +126,7 @@ int getDPI() #ifdef HAVE_ECORE_X return ecore_x_dpi_get(); #else - return 160; + return ecore_wl_dpi_get(); #endif } @@ -159,9 +162,13 @@ IntSize getDefaultScreenResolution() { int width = 0; int height = 0; + #ifdef HAVE_ECORE_X ecore_x_screen_size_get(ecore_x_default_screen_get(), &width, &height); +#else + ecore_wl_screen_size_get(&width, &height); #endif + return IntSize(width, height); } -- 2.7.4