Make a web page fit in the window 85/5485/2
authorJoone Hur <joone.hur@intel.com>
Wed, 3 Jul 2013 15:20:25 +0000 (08:20 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 8 Jul 2013 21:57:41 +0000 (14:57 -0700)
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

index 812f1ac..0ece8c2 100644 (file)
@@ -24,6 +24,9 @@
 #include <Ecore_X.h>
 #include <wtf/HashMap.h>
 #include <wtf/text/StringHash.h>
+#else
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
 #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);
 }