Modified: trunk/Tools/ChangeLog (134294 => 134295)
--- trunk/Tools/ChangeLog 2012-11-12 21:26:22 UTC (rev 134294)
+++ trunk/Tools/ChangeLog 2012-11-12 21:36:23 UTC (rev 134295)
@@ -1,3 +1,18 @@
+2012-11-12 Mikhail Pozdnyakov <[email protected]>
+
+ [EFL][WK2] Add --device-pixel-ratio command line option to EFL MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=101930
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added --device-pixel-ratio command line option to EFL MiniBrowser which sets
+ the ratio between the CSS units and device pixels when the content is unscaled.
+ Option is applied for all the views created by mini browser.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ (elm_main):
+
2012-11-12 Dirk Pranke <[email protected]>
remove the chromium-mac-mountainlion TestExpectations file
Modified: trunk/Tools/MiniBrowser/efl/main.c (134294 => 134295)
--- trunk/Tools/MiniBrowser/efl/main.c 2012-11-12 21:26:22 UTC (rev 134294)
+++ trunk/Tools/MiniBrowser/efl/main.c 2012-11-12 21:36:23 UTC (rev 134295)
@@ -43,6 +43,9 @@
static Eina_Bool frame_flattening_enabled = EINA_FALSE;
static int window_width = 800;
static int window_height = 600;
+/* Default value of device_pixel_ratio is '0' so that we don't set custom device
+ * scale factor unless it's required by the User. */
+static double device_pixel_ratio = 0;
static Ewk_View_Smart_Class* miniBrowserViewSmartClass()
{
@@ -70,6 +73,8 @@
('e', "engine", "ecore-evas engine to use."),
ECORE_GETOPT_STORE_STR
('s', "window-size", "window size in following format (width)x(height)."),
+ ECORE_GETOPT_STORE_DOUBLE
+ ('r', "device-pixel-ratio", "Ratio between the CSS units and device pixels."),
ECORE_GETOPT_CALLBACK_NOARGS
('E', "list-engines", "list ecore-evas engines.",
ecore_getopt_callback_ecore_evas_list_engines, NULL),
@@ -1030,6 +1035,8 @@
Evas_Smart *smart = evas_smart_class_new(&ewkViewClass->sc);
app_data->webview = ewk_view_smart_add(evas, smart, ewk_context_default_get());
ewk_view_theme_set(app_data->webview, THEME_DIR "/default.edj");
+ if (device_pixel_ratio)
+ ewk_view_device_pixel_ratio_set(app_data->webview, (float)device_pixel_ratio);
Ewk_Settings *settings = ewk_view_settings_get(app_data->webview);
ewk_settings_file_access_from_file_urls_allowed_set(settings, EINA_TRUE);
@@ -1109,6 +1116,7 @@
Ecore_Getopt_Value values[] = {
ECORE_GETOPT_VALUE_STR(evas_engine_name),
ECORE_GETOPT_VALUE_STR(window_size_string),
+ ECORE_GETOPT_VALUE_DOUBLE(device_pixel_ratio),
ECORE_GETOPT_VALUE_BOOL(quitOption),
ECORE_GETOPT_VALUE_BOOL(encoding_detector_enabled),
ECORE_GETOPT_VALUE_BOOL(frame_flattening_enabled),